Because of his original purpose, it makes sense that the Doctor wouldn’t have held a Starfleet rank during Voyager.
However, in Prodigy, he still doesn’t have pips. This leads to my questions:
- Can a self-aware hologram hold rank or a non-com position in Starfleet?
- If so, how would the Doctor attaib it?
According to the STO wiki, he doesn’t wear them by choice but does have a rank. That might be a reasonable explanation; I can’t imagine Janeway not at least trying to field commission him.
Even without an official rank, on Voyager he was still considered a Department Head and (more importantly) the CMO, which gave significant authority (even exceeding the Captain on certain medical matters), regardless of whether or not he was ever given any pips. The same thing would likely apply on subsequent postings.
If he ever had to be assigned a rank for clerical/administrative purposes, it would probably be the default required rank for a Starfleet CMO candidate for the class of ship he was serving on.
Voyager's original CMO was a Lieutenant Commander, which is presumably pretty typical for a ship of Voyager's size. Bashir was commissioned as a Lieutenant Junior Grade to be the CMO on a backwater space station, so that's presumably the bare minimum.
I would expect the Doctor's first official rank (whatever that might be) to stick with him, plus promotion as appropriate. Adjusting it up and down based on posting would be a bizare thing to do for any other crewperson, and I'm sure The Doctor would object vigorously to such a thing.