I suspect that it's completely legal for a private entity to pay a ransom so long as you're not paying a sanctioned individual
Obviously depending on your jurisdiction
So yes, there's a risk. But it's a risk many companies already take caesars entertainment paid, United health paid, etc
The risk would admittedly be much higher if our government was able to track and identify the ransomware groups, but I think this is incredibly rare.
I hope I don't ever get into this situation because it is a legal grey area, and one that doesn't have a good solution