It's a fair question. But I think we can distinguish.
First of all, the hypothetical made it clear: there is a clear choice between saving the drowning dog and saving the stranger. It's one or the other under the hypothetical. Not so with feeding your dog or preventing a poor child from dying of malnutrition somewhere in the world. The one is immediate, the second is contingent or at least not immediately subject to preventing. You can give money to a charity and hope it will ameliorate malnutrition and save a life. But it may or may not, and it's not something in your immediate control. The less invidious comparison is between (1) feeding a starving dog or (2) feeding a starving person right there in front of you. I'd give the food to the person. I think it would be immoral not to.
Second, the hypothetical is constructed to involve no risk or burden to the lifesaver. The idea is that you have to choose to save a dog or a person, not weigh the risk of saving one or the other. Weighing the risk is a fair thing to bring up, but it brings up other considerations. If the moral question is, do I risk my life to save a stranger, that's just not the same moral question as do I save a dog or a stranger (both of which without risk). I don't think there's anything particularly immoral in saying, the risk to my life is too great for me to try to save the stranger. It may not be a brave choice, but it's not an immoral one. That's something everybody has to decide for himself. Your question is less like the original hypothetical and more like the risk hypothetical. Helping others doesn't require us to give up everything we have, including the amenities of life (like pets).
So your question certainly raises an honest moral question (should we own certain amenities in an unfair world where 1B people are undernourished?). But it has nothing to do with pets. You could ask the same thing about spending money on basketball shoes, cell phones, and college tuition -- anything beyond the necessities of life -- instead of helping starving children. I would say that it is certainly a virtue for somebody to give up the amenities of life to help others, but I don't know if it's a vice to have some amenities, even if that means giving less to assist others in need. I think a better solution is not to give up every amenity for charity, but to engage in political action for a fairer system of resource allocation. In short, this is a complex social, political and moral question in a way the dog/stranger question isn't.