Any profession can wield any weapon. It's just that the damage won't be strong if you don't meet the requirements on the sword (if it has requirements).
However if you are a Ranger/Warrior, along with a bow you can wield a sword and you can do max damage on the weapon if you boost Swordsmanship or Marksmanship.
It's actually a good thing that any class can wield any weapon.
Like for instance, if you were a Ranger/Warrior, you might have something like this:
Marksmanship: 9
Swordsmanship: 8
And then you wanted to wield these two weapons:
Longbow 15-28 dmg - Req 9 Marksmanship
Long Sword 15-22 dmg - Req 9 Swordsmanship
You would be able to do maximum damage with the bow however you'd do hardly any damage with the sword. However if the Req was 8, then you'd do max damage with the sword.