It’s beyond the scope of this book to describe all the personnel needed on a ship, but in a fantasy world, we have new humanoid species and occupations that can be added to the typical crew from Earth vessels. This can be true in SF, too, but the crafts there are usually spaceships. Ships often had livestock and even plants, mostly for consumption, which means our invented plants and animals can be aboard, too.
Many fighting ships have military on board for the combat that might ensue when ships entangle (on purpose or not). Any sailor can engage in the fighting, but trained military are typically aboard during fleet actions. We can have such people onboard any vessel as standard crew, their numbers depending on overall ship and crew size. Larger numbers of such warriors will need quarters set aside for them (they may not be berthed with the sailors), but we needn’t go into such details unless desired.
Knights are an obvious choice for hand-to-hand combat. They weren’t on ships during the Age of Sail for the reason of gunpowder: bullets, and by extension cannons, had rendered armor useless. If we lack this issue on our world, then knights might figure heavily in the military aboard. A single knight could be present to represent knightly values or a kingdom on formal terms, or a group could be there in expectation of combat at sea. They can be available for missions ashore. However, even in a world without guns, knights still sink rather handily once overboard. They also make fine targets for archers.
Pirates wouldn’t have knights on their ships and might think twice about attacking such a ship, if knights are assumed to be aboard. Why would they assume this? British ships-of-the-line were known to have marines aboard, so a ship belonging to a country of our invention can, too. Raising the country’s flag might warn off pirates.
Ninjas or other forms of martial artists could be highly prized, due to their superior rope climbing skills and balance on those yard arms. Imagine how quickly they can board an enemy ship at close range.
Aboard a ship, unless there’s a duel of some kind, the fighting is in close quarters, so space constraints would render weapons such as a staff less effective. Consider the weapons used by your warrior class which is routinely assigned to a ship, and whether they’re appropriate under these conditions.
If guns don’t exist on our world, archery is the obvious long-range weaponry fired by one person at a time (as opposed to a cannon). This can happen before and after ships entangle. These can be long/short bows or crossbows that fire flaming arrows into rigging or the hull (or people). Consider where such individuals might be stationed as ships battle.