A same sex teacher having a wedding ring on or mentioning their spouse during math class would be teaching the kids about same sex relationships. It it was interfering with classes they would be showing examples of it but, to my knowledge and research, they haven't shown this.
You should read the actual text of the law. It's directed to "instruction" on "sexual orientation" or "gender identity." It's meant to prevent an off-hand mention of someone's same-sex spouse from turning into a discussion of sexual attraction and sexual orientation.
All activities in the classroom typically fall under the category of instruction not just the formal segments. This law is one of those laws meant to be used against the wrong people while ignoring when the correct people do the same sort of things.
Teachers by definition act in loco parentis; if parents disagree with other adults about values, that's a separate issue, but teachers shouldn't be overriding kids' parents on ideology.