these are two different questions for sure: although there can be interesting similarities too.
both involve power and sex. both get various feminists and christians in a bother. both can be confusing (ie sex workers can feel multiple and diametrically opposed things about their work, and bdsm practitioners can be conflicted about their sex practices too).
the difference of course is intense though, in that sex work is WORK, and so it is almost never entirely consensual (since work in a capitalist system is never consensual). BDSM is entirely consensual (presumably), although i guess there could be a question about how much we consent to the things that turn us on. (that's getting pretty philosophical though.) and we do consent to the practices we do, unless there is something else going on.
how's that for semi-coherent!?
lol
bdsm (as with any consensual sex act) is unrelated to anarchy, as far as i'm concerned, although any behavior that encourages us to negotiate and acknowledge that people are different can be a nice reflection on how we meet our own and each other's needs.
sex work, as i said before, is work first and sex second (at least in my estimation). so it can be a good compromise for some people and a bad compromise for other people, but the anarchist analysis i would bring to it is the one i bring to work.