Can we avoid keeping company with all the immoral people of the world? No, it is impossible, as Paul said,
“I wrote to you in my epistle not to keep company with sexually immoral people. Yet I certainly did not mean with the sexually immoral people of this world, or with the covetous, or extortioners, or idolaters, since then you would need to go out of the world” (1 Corinthians 5:9-10).
Yet, if a fellow Christian lives in those sins, we have to separate from him,
“But now I have written to you not to keep company with anyone named a brother, who is sexually immoral, or covetous, or an idolater, or a reviler, or a drunkard, or an extortioner—not even to eat with such a person” (1 Corinthians 5:11).