Once a domain name is registered, it’s registered.
The only way to lose it is to let it expire and for someone else to buy it. (Yes, there are other ways, but they are beyond the scope of this discussion).
When you register your included free domain through Dreamhost, it’s registered in your name… it’s yours. If you quit using DH, you’ll either want to transfer it to where you go or keep using DH as your registrar.