Can I simply buy dedicated IP addresses from any website and assign them to my server?
You can't get provider independent IPv4 space unless you are buying at least a /24 worth (which will cost you at least $6000) and have your own autonomous system. You don't have your own AS; you aren't big enough.
You will need to obtain IP addresses from whoever hosts you, who does have their own AS. You won't be able to take these addresses with you to another provider; they remain with the provider who supplied them to you.