If a teacher/rebbi scolded a student for making fun of another student, and this rebuke was given in front of others, which embarrassed the student, does the rebbi have to ask that student for forgiveness? If not, why not?
Rambam, laws of Torah Teaching, Chapter 4:
ד,ז [ה] לא יהיה התלמיד בוש מחבריו שלמדו מפעם ראשונה או שנייה, והוא לא למד אלא אחר כמה פעמים: שאם נתבייש מדבר זה--נמצא נכנס ויוצא לבית המדרש, והוא אינו למד כלום. לפיכך אמרו חכמים הראשונים, אין הביישן למד, ולא הקפדן מלמד.
ד,ח במה דברים אמורים, בזמן שלא הבינו התלמידים הדבר מפני עומקו, או מפני דעתן שהיא קצרה; אבל אם ניכר לרב שהן מתרשלין בדברי תורה ומתרפין עליהן, ולפיכך לא הבינו--חייב לרגוז עליהן ולהכלימן בדברים, כדי לחדדן; ובעניין זה אמרו חכמים, זרוק מרה בתלמידים.
A student shouldn't feel embarrassed if his colleagues understand something after the first or second explanation, but he needs more -- as if he's too embarrassed (to ask), he will have come and gone from the study hall without learning anything! Therefore our Sages said, "someone too embarrassed can't learn, and someone too demanding can't teach."
However, this only applies if the students don't understand because the subject is too deep or their intellectual capacity too narrow. But if the teacher feels that the students are goofing off and therefore not understanding, he is obligated to act agitated and verbally humiliate them, in order to sharpen them. And in this context, our Sages said, "throw bile at your students!"
So in theory -- I repeat -- in theory -- there can be instances where a teacher has the right to embarrass a student. When is this appropriate, when is this necessary, and will it have the desired effect -- those are much more difficult questions. So perhaps the teacher might apologize "I'm sorry I went too far", or "I'm sorry if I misjudged and felt this was the only appropriate way, when there may have been other options." But he wouldn't say "Halacha forbids me to ever, ever embarrass a student."
See also the conversation from Nachum Lamm and Joel Rich on TorahMusings, about Rabbi Joseph Dov Soloveichik:
a story of the time the Rav humiliated a student in front of the whole class for asking a question he felt was not so good. Of course, the Rav apologized (after, it is stressed, we are told that he realized the student’s question was a good one, leaving unsaid the question of what if it hadn’t been). ...
I remember reading that The Rav was raised in learning this way by his father, perhaps due to the fact that such geniuses could only understand a poor [logical argument] as a reflection of intellectual laziness. It wasn’t until the year of triple aveilut [1967, in which he lost his mother, brother, and wife] that he realized this wasn’t true.