Nowadays this would be very difficult because the mere fact of being around "bad" people ("bad" depends on the context and might be something relatively innocent) would also brand you as "bad" regardless of any good intentions you might have.
What ends up happening is that "bad" people are stuck in their own echo-chamber surrounded by like-minded people and anyone outside of the group wouldn't dare to engage with them (and provide counter-arguments) because of consequences for their own career & social circle (as their own friends would distance themselves from him for the same reasons).