That's not entirely correct as freedom of speech is supposed to give you freedom from some consequences. If it didn't then a state could say that everyone is free to say anything they want but they aren't free from the consequences of being shot for saying the wrong things.
That's just a general statement, not about the teacher's case. The classroom is at the very least not the place to push personal views. The poor kids that come to school with political attire are probably getting pantsed during recess anyway.