I was taught the same thing as you. Hand over heart for the pledge, stand at attention for the anthem.
Yes, and I think if someone is in a respectful posture during the anthem, people should back off. You don't know what etiquette was taught as a youth.