An Acting Pilot Officer is a commissioned rank, whereas a Midshipman is not. - John Eacott
Well, John, please try these two links for size
https://en.wikipedia.org/wiki/Ranks_...es%27_officers
https://en.wikipedia.org/wiki/Ranks_...orces_officers
and pan down to the UK to see who is an OF-1 and who is an OF(D).
Incidentally, I rather fancy the Polish and Portuguese Navy insignia whereby Captains can masquerade as Admirals and Portuguese Coronels (Group Captains) can pretend to be Air Chief Marshals.....
I'll never forgive myself for saluting and calling a Portuguese Commander "Sir" when the "Desgraçado" was actually junior to me!
Jack