I would recommend a six line wrasse...more reef friendly than the arrow crab, and does a better job. In fact I have never heard of arrow crabs eating flat worms.
I have had arrow crabs in tanks that were littered with flat worms, and nothing changed.