How do I forbid wrong actions to my teacher at school?
So that he doesn't get upset. That means, don't correct him in front of the students.
Advise me privately, meaning don't correct him in front of the students, do it between you and him, or send a message without writing your name on it.
A paper message, put it in an envelope or something like that, put it under his bag or something similar, or give it to a teacher to give to him, the important thing is that it's done indirectly.
Deliver this message to him politely, with nice words at the beginning.
My teacher, my dear teacher, and so on, I wish good for you, I benefited from you, if it's true of course, he benefited, don't lie to him.
The point is that he starts with praise, then mentions it.
There is nothing wrong with rejecting evil, inshaAllah, yes.