In strong terms, Paul commands the people not to associate with those who live in idleness. This is not simply lending a helping hand to those who are down on their luck, but to those who refuse to work and simply live on others and gossip. Paul commands such people to attend to their work quietly.
In contrast, 1 Cor 5:9ff describes a situation where those who are wicked must be driven out, but this is not that situation. Such people are not enemies, so we are to help them by warning them.