I am careful not to draw attention to myself in those situations. If I am offered an alcoholic drink, I just quietly and politely say "no, thanks", then change the subject. It also helps if you are already holding another kind of drink in your hand, and just keep sipping it from time to time. And make sure it remains topped up, so that no one is tempted to pour anything nefarious into it. IMO, there is nothing sanctimonious about the method described above.
be sanctimonious would be to loudly say, "No thanks! I am a Buddhist, and we
don't indulge in intoxicants, because this creates very bad kamma. Everyone here who is doing so is doing the wrong thing!" And while that statement might be true, it is not appropriate to the situation, because it will most likely not change anyone's mind for the better - it would just make people regard one as a sanctimonious wet blanket.
So it's all in how you handle the situation. imo.