Sex work is ok if the situation isn't coercive. A situation where the only reasonably available alternative choices are homelessness or starvation is coercive. Sex work is fine but a system that provides it as "last ditch employment" or as a means of survival in absence of alternatives is no different than rape.
This applies to a lot more than sex work though :/