I can only control my own behavior. I cannot force another to change, they have to want to. The only thing I can do is draw the lines I’m willing to live within and live by them. And if not associating with bad people, even if they are family, is what I need to live in a healthy way, so be it.
As a gay guy who’s definitely been in the room for gay jokes because they didn’t know I was gay: yes, you do. If you are only willing to call out bad behavior when you may get caught associating with it, then you aren’t actually an ally.