I'm afraid that the rules you learned for SOME and ANY are not correct, Cesar.
For instance, these sentences are all correct:
"Do you have some money?"
"Do you have any money?"
"Do you want some [candy/potatoes/gravy]?"
"Do you want any [candy/potatoes/gravy]?"
"I do not want any [candy/potatoes/gravy]?"
"If I have some time tomorrow, I will call you."
"If I have any time tomorrow, I will call you."
"Is there some pizza left in the box?"
"Is there any pizza left in the box?"
There are no easy rules regarding when to use each word (at least none that are easy to explain). The best I can say is that "some" usually implies "enough for a specific purpose"; and there is a positive expectation (i.e., the expectation is "not none"). However, the word "any" usually implies "even the smallest possible amount (whether enough for a specific purpose or not)" and there is a negative expectation (i.e., the expectation is "none").
For instance:
"Is there some pizza left in the box?" (This implies that I believe there is probably pizza in the box and enough for me to enjoy eating or enough for me to wrap up to save for later, perhaps a full slice or two.)
"Is there any pizza left in the box?" (This implies "even the smallest amount"; it implies that I do not expect there is pizza left, and if there is, it is a very small amount.)
Another example:
"Do you want some cake?" (I expect that you are more likely to want cake.)
"Do you want any cake?" (I expect that you are more likely to not want cake.)