IANAL. but I would imagine that they couldn't fire a teacher for doing that as a matter of public policy. Of course, public policy exceptions are flighty, unpredictable things, and I haven't researched this but I feel like people go "OMG! Lawsuit!" far too quickly. Courts are still largely run by human-being judges and juries. We haven't surrendered total control to the City Fathers* yet.
*Sci-fi James Blish Cities in Flight reference for those who are wondering. And if you are wondering, it's well worth checking out.