Ahhh. Thank you for that.
The latter is not dispositive since it reflects a command structure more than a decade old, but the former one is.
Actually the personnel officer in "Court Martial" was herself an ensign at the time of the court martial, according to Memory Alpha.
https://memory-alpha.fandom.com/wik...701)_operations_personnel#Personnel_officer_1