https://www.treasury.gov/resource-center/faqs/Currency/Pages...
If you ate at a restaurant which had a 'no cash' policy, I'm not sure how you would resolve a situation with a client who was willing to pay in cash only. Would the restaurant be able to refuse your cash and say you ate without paying?
I doubt it would be too difficult to find another customer who would swipe their own card in exchange for cash from the cash paying customer... free reward points after all. (Infact many people do something similar in India, we receive a fixed allowance which is tax exempt but can only be spent on food, this is given via a special debit card or vouchers. You pay for someone else's food using the voucher and take cash from them)
In general though, probably yes so long as it's stated in advance. And there are certainly many situations where you wouldn't expect to be able to use cash; I can't mail Amazon a stack of bills.
Are online retailers in Poland required to take cash?