She had been called "Commander" earlier in the book. But you're right she was an Lieutenant in "The Cage".Which is correct. Pike addressed her as "Lieutenant" when insulting her femininity. ("No offense, Lieutenant. You're different, of course.")
Damn. I thought I'd caught all those "Commander" references. I originally assumed she was a Commander, then went back and fixed it when I realized she referred to as a Lieutenant in the episode . . ...
Although it is normally abbreviated as "commander" (as in real life), Trek seems to have an odd habit of occasionally referring to lieutenant commanders as "lieutenant". So you could say she was really a lieutenant commander, and then both references are "right"!

(I always thought it was odd that the first officer was supposedly only a lieutenant. But then I guess back then the Enterprise had less than half the crew, too, so I guess maybe that billet didn't require as high a rank as it later would?)