I read verses like this and think of church pot-lucks. We tend to think of them as social occasions but there is the spiritual element of fellowship or koinonia. We tend to think in terms of not offending but there is a warning for the associations we make. Paul warned us,
(I Corinthians 5:11 KJV) But now I have written unto you not to keep company, if any man that is called a brother be a fornicator, or covetous, or an idolater, or a railer, or a drunkard, or an extortioner; with such an one no not to eat.The NASB uses the phrase “so-called brother” for these people. Is that being harsh? Take it up with Paul, not me.
Just because someone attends the same church or claims to follow the same God does not mean that they are what they claim to be. Of course there is the problem of judging but there is also a more common problem of no discernment. I do not believe that judging is as big a problem as lack of discernment.
So? Be prayerful about the company you keep. We are required to be at certain functions but there is a difference between a command performance company party and fellowship. Seek the latter and keep you defenses up at the former.