No, acquiring a web hosting package is not necessary in order to buy a domain name.
However, if you do not have a web hosting plan, you will not be able to use your domain name to create a website.