If someone is doing something mean to someone else, and you just stand there, is that like sinning too?
In view of your question, allow me to suggest first how we ought to deal with such a matter with a believer and then consider the sinning aspect of it.
The Bible teaches us the following: "He that covereth a transgression seeketh love" (Pr. 17:9) and "Open rebuke is better than secret love" (Pr. 27:5). Please also read Proverbs 10:12, 27:6, and 1 Peter 4:8.
Covering does not mean we should hide the issue; rather, we should deal with it directly (and privately) with the believer in question. We should talk to them in a spirit of meekness, praying that we may help them. We should never be indifferent to sin, error, and meanness.
As to the sinning aspect, the Bible teaches us that associating with individuals who sin makes me guilty as well, even though I might disagree with their actions. See Joshua 7, 1 Timothy 5:22, and 2 John 2: 11.
If the individual is an unbeliever, I trust that reading Ezekiel 3:18-19 will be helpful.