For example: if a parent is about to accidentally be mechallel shabbos at a shabbos table with guests, do you publicly warn them before they do it if you have no other choice? What if there are minor opinions that hold that what they are doing is mutar?
If there are opinions that are halachically acceptable, then you should not say anything to them in such a setting. You can however find a different time to bring up the matter in a way that won’t embarrass them, such as saying over a halacha that you learned. This way they will learn what is right, without the embarrassment. Even if there aren’t lenient opinions to rely on, we cannot tell this to them if they will be embarrassed by it. Aside for not embarrassing a parent, there is a negative commandment not to embarrass the person while correcting them. I don’t know the specifics of your situation, but it has to be done in a discreet way, honorable fashion. Otherwise, not only will your message not get across, but it will often cause animosity, which will have the opposite of the desired outcome. As a side point here is a rule regarding giving tochacha, “The same way it is a mitzva to say something that will be listened to, it is a mitzva not to say something that won’t be listened to” (Yevamos 65b). Therefore, for whatever reason it might be, if what will be said will not be listened to, it is a mitzva to just keep quiet. If you can say something at a later time, when that time will arise that is when something may be said.
Rambam Hilchos Daos 6-7. Y:D 240-11, 241-6, Sefer Chareidim chapter 9-35.