I like both ideas. But for the mature captain, why would she be betrayed? And if she was a younger deck hand, how would she be privy to the knowledge of what the captain is looking for? Maybe she would but to the extent of my knowledge of pirate lore, I would think the deck hands merely follow the orders of keeping the ship maintained and clean. Maybe she overheard the captain talking about the talisman? Or maybe you could have her be the quartermaster. They're the highest ranking officer just below the captain (so basically second-in-command). They oversee punishments and discipline and have the power to veto the captain's decisions. They also are usually the ones to lead a raiding party (unless the captain themselves prefer to). Just another option.
I also just had another idea. Back then, having a woman on board a ship was considered some serious bad luck. Maybe you could have her be disguised as a boy and someone finds out that she's actually a woman, thus throwing her overboard? Maybe she's an orphan and decided to become a pirate in order to start a new life for herself? I don't know. It's up to you. Hope this gives you some ideas. :)
It really just comes down to what kind of personality you want her to have and build her character around that. Ruthless and cunning? Be a captain. Reserved and stoic? Quartermaster. Young and naive but potential to grow out of that innocent ignorance? Deckhand. Tomboy and independent? Woman disguised as boy. But that's just how I see the personalities. You might view them differently.
Sorry for the word vomit haha