I actually see both sides of this...
Next time, in a lighter, more non-aggressive way, I will simply let A know that I do not have time for these projects during work hours, and if they want to charge me for overtime, I will start the project at 5pm once I am off work hours, and we will figure out some sort of pay for my time.
I think that's acceptable. Let him know that working on something else will delay in-house work, but if he says that's okay, what can you do? He's paying you to work 9-5, and if he wants you to use your skill for someone else, then that's okay. You could always ask for a raise if you feel you are worth more than you are being paid, especially if this were to become something regular such that he was using you as a consultant and making lots of money on you.
He really could've been cool about it and cut me in, though. Maybe $100 for my time, or whatever. A friggin gift card to Starbucks, I don't care. I still think I would've done that, from a moral standpoint if I were in A's shoes.
As a manager/boss, one of the things I've learned the hard way over the years is to judge people's expectancy of gratitude in terms of it's magnitude and expediency. Some people respond very well to immediate displays of gratitude from their employer, even if the magnitude of the expression is fairly low. I've seen people get excited over a $25 gift card to Applebee's, while another person thinks it's a slap in the face. Other people will accept those smaller, immediate expressions gleefully, but they're quickly forgotten such that they still expect something larger when the time comes, such as a fat raise or bonus. Not sure if your boss is good at figuring this kind of thing out, but the best thing you can do is talk to him about it, calmly and respectfully, so that it helps him understand your expectation as a valuable employee. If the two of you can't come to an agreement over time, then at least you've done your part and can move on without regret.
I think a happy worker is a productive worker, and the guys here, like A, have the mentality that "we should all just be happy we have a job anyways".
You are correct again, but on the flip side you never know what is going on behind the scenes at your place of employment, especially with regard to finances. A company can be in dire straights for a long time with a very bleak outlook on the future long before it gets out with the employees who only see their paycheck. It's hard to say, but I'm just speaking generally. One this is for certain though, which is that letting bitterness and resentment set in is pretty much always going to take more from you in the end. It's better to be open with your employer about your needs (also being careful not to let him/her have a reason to resent you and become bitter in the process!), and then make your decision on how you move forward with a clear mind and conscience. Petty acts of disloyalty such as the person mentioned in this thread before will never result in anything good. A person who is prone to feeling victimized might think it's the right response because it brings an emotional satisfaction that they've payed someone back for their actions, and that they've prevented someone from taking advantage of them. In reality however, the person who acts like that is really too ignorant and short sighted to see that the only person they will harm by behaving that way is themselves.