How does one give someone advice to a person who gossips but sees nothing wrong with it? If you say to them, please don’t do that it’s considered a sin to disclose other peoples faults, they will fire back and say who do you think you are, you are judging me etc. Where do you draw the line between judging someone vs giving advice or simply judging the situation itself?
In the specific example you give it really would not be necessary for you to say that such such was a sin. You could just say, "Please stop. I don't wish to be a party to such activity." If the person did not stop you excuse yourself and leave. Unless you are some kind of authority figure (like a parent or teacher) you will probably find the "shunning" approach more effective.
If you are hanging around people who want to do things like steal or hurt people hopefully you are more worried about alerting the authorities then you are about them pulling the, "You're judging me," card.