What happens when you rescue an opposing civilization's settler from the barbarians?
Solution 1:
If your own settlers get captured by barbarians, and you rescue them, they will remain a settler.
If any other civilization's settler gets captured by barbarians, rescuing them will turn them into a worker (if you claim it for yourself) or stay a settler (if you return it to them).