Do we know whether Janice Lester was a starfleet officer? Here's her background story:
The Enterprise has received a distress call from a group of scientists on Camus Two, who are exploring the ruins of a dead civilization. Their situation is desperate. Two of the survivors are the expedition surgeon, Doctor Coleman, and the leader of the expedition, Doctor Janice Lester.
So, instead of the officer track in Starfleet, she's got a doctorate in possibly archaeology, and she's the expedition leader. Also:
JANICE: The year we were together at Starfleet is the only time in my life I was alive.
KIRK: I never stopped you from going on with your space work.
This paints the picture that they were both in Starfleet, him for Starship service and her for "her space work" which doesn't sound like Starship service, rather both pieces of the puzzle suggest Lester was in the sciences for archaeology on planet expeditions rather than a ship-born assignment.
JANICE: Your world of starship captains doesn't admit women. It isn't fair.
KIRK: No, it isn't. And you punished and tortured me because of it.
JANICE: I loved you. We could've roamed among the stars.
I'm convinced that "your world of starship..." only applies to Kirk not wanting to get tied down in a serious relation or marriage since his goal was to be a Starship Captain and he knew a relationship could threaten that goal, and he agrees with it. She never wanted to be a Starship Captain, she just didn't want Kirk to be a Captain so they could be together. Fifteen years later and she's bitter(crazy?) and takes revenge of Kirk for her unhappiness.
If both of them wanted to be Captains, then how in the hell would they roam among the stars together on separate ships? Any ship-born posting would keep them apart. No, Lester expected Kirk to quit his career path and join hers as scientists exploring ancient civilizations, etc. Remember, Kirk's brother Sam was some sort of a scientist, so, it probably runs in his family...maybe young Jim Kirk saw the affects of marriage on his older brother's career choices...stuck on an obscure planet doing boring work. Not me!