I think your fears may be exaggerated. I can't think of a professor I've ever met who I think would be offended by having a mistake (politely) pointed out, much less retaliate.
Accusing anyone flat-out of being wrong, or worse yet, lying, will certainly make them defensive; and if it turns out they were right, it will be more embarrassing for you. So I don't suggest thinking of it as "confronting" the professor. What I would suggest instead is to approach the question as something that you don't understand. "Hi Professor Smith, in class today you said X. But I'm confused, because I thought that Y." Listen to her response. Be open to the possibility that you are mistaken, or have misunderstood what she said, but if your doubts aren't cleared up, figure out what part still seems wrong to you, and ask about that. "I still don't understand; what about...?" Stay calm and polite. If you find you are getting worked up (or she is), take a break. "Let me think about that, and if I still have questions I'll come back later." Hopefully in the end, everyone agrees on where the truth lies, and nobody feels too embarrassed.
If you think she's simply misspoken about something in class, or written something incorrectly on the board, point it out right away: "Is that X supposed to be a Y?" If there's something deeper, it may be better to discuss it in office hours or by email; I know that when I'm teaching, if I think I may have a serious mistake, I get flustered and it throws off my rhythm. I'd rather have time to think about it offline, and then correct the error in the next class.
I think the other comments saying "Be sure you are right!!!" are excessive. It's not a bad idea to try to think carefully about your question; if you can clear it up yourself, you'll learn better. But don't hesitate to talk to the professor. Even if it's you that's confused, part of my job as a professor is to clear that up. And if it turns out I'm wrong, of course I want to know.
Your suggestion of having some sort of middleman to anonymously forward queries strikes me as a bit extreme. Again, I think you may be more intimidated by your professor than is really warranted. It may help to try to get to know your professors better: early in the course, make it a habit to drop by their office hours. Ask some trivial questions if you like. "Are we going to study Z next week?" Then later, if you have more substantive questions or concerns, you'll feel more comfortable approaching them.
Anonymity seems unnecessary and perhaps counterproductive. If you come to me with something you don't understand, and I'm able to clear it up, I won't think less of you; instead, I'll be pleased that you now understand it better. And if it turns out I was wrong, I won't resent you; I'll be impressed that you understand the issue deeply enough to spot the error, and grateful that you brought it up. But if you're really timid, you could consider sending an email from an anonymous account. ("I'm sending this anonymously because I'm embarrassed that it may be a silly question." Either way she'll probably assure you that it isn't.)
One final comment: If you have mentors suggesting that professors are never wrong, find better mentors! I agree that it is not pleasant to argue with anyone, but that doesn't mean you can't discuss your question and try to sort it out.