That character was indeed insane, so I think it likely there only were no female captains of starships at that time--more specifically no captains of Constitution-class ships.
We don't even need to assume that much. Janet Lester's exact words were, "Your world of starship captains doesn't admit women." That could be taken to mean that his duties as a captain left him no room for a woman in his life. Or maybe it was just a paranoid delusion she constructed to avoid admitting her own lack of qualifications. It makes no sense to assume that an assertion by an insane person is true on any level at all.
In the Pocket novels, there is indeed at least one female captain of a Constitution
-class ship contemporaneous with TOS, Captain Atish Khatami of the Endeavour
. John Byrne's IDW comics have Pike's Number One as a commodore commanding the Yorktown
during or shortly after the events of TOS.