Overreacting a bit, but, assuming your kid is telling the whole story, the teacher should not be forcing this? Are you completely sure he wasn’t making a fuss about being asked to do it, thus provoking the telling off? Completely forgivable from a 7 year old of course, who is probably following your lead (based on your reaction)?
Another way to think about this is to ask the question why does your Son not believe in God? Because you’ve taught him not to, of course. At his age, he hasn’t decided this himself. Perhaps it would do him good to have some experience of other views, so he can form a more balanced opinion, and make up his own mind some day.
Okay seriously, as above could you not just advise him to bow his head discretely as a mark of respect to other peoples beliefs? Assure him that doing so does not make him believe in God.
Disclaimer: I’m atheist, but capable of ignoring religion.