The word “judge” has caused considerable confusion.
You may “judge” (in pointing out ‘the sin’) as did the prophets & apostles but you may “not judge” (in passing out a ‘sentence’) for this can only be Perfectly meted out by God alone.
Regarding a believer’s role to judge (if he chooses to):
“have ye not known that the saints shall judge the world? and if by you the world is judged, are ye unworthy of the smaller judgments?” (1 Corinthians 6:2)
Regarding God’s Perfect Role as the Judge:
“There is only one Lawgiver and Judge, the One who is able to save and to destroy; but who are you who judge your neighbor?” (James 4:12)
But be “warned”:
The “measure you judge” (e.g. pointing the errors of others or the level of ‘strictness’) will be “meted back to you as well” (where you’re justified if you didn’t do those errors or maintain that ‘level of strictness’ and condemned otherwise accordingly).
“For in the way you judge, you will be judged; and by your standard of measure, it will be measured to you.” (Matthew 7:2)
The only “action” you’re entitled to when you see an unrepentant behaviour which is affecting you is to “keep away from that person” (e.g. I ‘quit’ the church which doesn’t teach the ‘truth’ fully).
“Now I urge you, brethren, keep your eye on those who cause dissensions and hindrances contrary to the teaching which you learned, and keep away from them.” (Romans 16:17)
If you’re unsure, don’t judge at all:”Do not judge so that you will not be judged.” -Lord Jesus Christ in (Matthew 7:1)