Yes, you can use WordPress to create a website without having to buy hosting. However, a hosting package will be needed for that website to go online. A WordPress bundle is often bought in addition to hosting. Although, in theory, hosting is not necessary when building a test or demo website.