Did the Zar get those ranks before war started?
In the given example: yes. I have picked this example due to it being "most obvious" to people. There are more complicated examples to be found in history. History has a number of nobles in Europe from medeival times to the the 16th and 17th century, who held property in several nations and gained rank there. In case of doubt, study the history of the House of Habsburg. (And don't just focus on the family tree.... although one shall also note that a circle is not a healthy family tree...

)
What you actually can look at is the whole rise of some people there. The whole political landscape often was one years enemy was the next years ally. And noblemen just made their way and career in between those permanently shifting alliances. And hey, that's kind of what we also have in ED. Unknown to many players here, the world of ED is not in an all-out war between the Empire and the Federation. They actually, at the moment, are even allies against Thargoids. But even without Thargoids in focus, they are at peace. There's one or another placeholder war here and there, but officially they are at peace.
The situation is not that far off from older times. And thus the whole idea of having -honorary- ranks (yea, this also seems to be a concept which was very common in old times, but seems to be too complicated to understand for present day people) with several rivaling groups is quite fitting.