Don't go looking for loopholes and back doors. If at level 15 you are friendly toward the Junkers and make the purchase but later change your ID to a faction hostile toward the Junkers at level 40 you really need to change your ship.
You would not expect a Rogue to be flying a Liberty Dreadnaught would you? After all - we all start out friendly toward Liberty Navy. So why not purchase a Whale at Houston and a Trader ID to go with it, then build up your cash to buy that Dreadnaught. Next, go kill some Liberty Navy until you can dock at Buffalo and buy that Rogue ID. I hope you see my point here. Just because you were friendly enough to land at a lower rank to purchase the ship doesn't mean you can still fly it when you change your ID. Its bad RP.