While I do see your point, I would rescue the animal if I felt it were suffering too much. Sure, the pet store will profit, and they'll just buy another fish to put in that half cup of water. But honestly, they are probably going to do that anyway. So, the fish I see dies, and so does the next one, and on and on.
But, if I buy that one fish, at least he will get to have a chance. Helping one fish is better than helping none.
Also, if this were the case, I wouldn't just buy the fish and go home and live my life. First off, I'd buy the fish, and then let the owner/manager, or even clerk have a piece of my mind. I guarantee you, they'd throw me out of the store. Then, I'd go home, get online, and spread the word as much as possible, and let everyone know that this store doesn't care about it's animals.
Save the fish, hurt the store. Who cares about the 0.50c in profit they made off me? I'll cost them more than that after I hurt their reputation.