Are patents appropriate in taxpayer funded academic settings?
Yes it is ethical.

The patent will typically be owned by the institute and it will get most of the revenues (this is why they encourage it). The inventors usually get some form of compensation. Revenues from commercialization is partially how your salaries can be payed and could in fact save tax-payers money.

More importantly, developing a new diagnostic or therapy will in the end improve the lives of the general public (and even save lives in many cases). Currently, due to the immense costs involved, the only way to get a new therapy to the public is in a commercial setting.