This question is almost off topic. But since it has to do with an HP Officejet, I will say "Yes, it is possible".
Typically, to avoid fax calls ringing on a phone, you need a separate line so the call goes direct to the fax. That is the preferred solution by your provider. To avoid the cost and hassle of a second line, there are devices called fax switches.
A fax switch senses the call type and sends it to the proper device. Since those types of devices are off topic here, all I can say is do a search for "fax switch" and you will find all types of them. A search on Amazon resulted in over 100 results.
Disclaimer: Although it should work, I make no guarantee any of these devices will work with your setup.