You have it slightly correct. Since 1999 the song "Kimigayo" and the Hinomaru are legally recognised at the national anthem and flag, and teachers are supposed to stand and face the flag while singing the anthem. Pretty standard stuff, you do that anywhere.
Issue is that many teachers do not agree with this as of the history involved with the flag and anthem - a crude comparison would be flying the Nazi swastika and singing Horst Wessel in Germany - I'm sure that many, many people would object.
I'm not up to date on the left/right standing, but I can always read up on it.