The passage in James when read in its context is more about "equality" then it is judging the rich. The rich man is just as able to be saved as is the poor man but the poor man is not to be thought any less than the rich man. That is the lesson of James. Not judging but "Equality".
As for judging, is we are to keep God's commands, we must first judge what is right and what is wrong.
Consider 1 Corth. 5:11-13...………….
"... you must not associate with anyone who calls himself a brother but is sexually immoral or greedy, an idolater or a slanderer, a drunkard or a swindler. With such a man do not even eat. What business is it of mine to judge those outside the church? Are you not to judge those inside? God will judge those outside. 'Expel the wicked man from among you'".
It is more than clear that in these verses, God tells us to judge church members and expel them if necessary.
Then we are told in Romans 12:9...…………..
"Hate what is evil; cling to what is good".
How can we do that if we don't first judge what is good and what is evil? So, we must make judgments about what is right and what is wrong so that we can live according to God's commands.
I realize that a lot of people do not agree with me on this subject, but please read the Scriptures and understand that your problem on this subject is not with me but the Word of God.