Is there any possibility of luring a sword off with a worker? You'd have better chances with two archers and a warrior vs three swords than vs four, of course...but I don't know if the barbs would kill a worker before attacking the city.
For lemming-mode barbs such as the ones from the barb invasion event, no. Nothing can deviate them from their path AFAIK.