There are obvious cases and many non-obvious ones.
To make an exaggerated point: Medical research is not too far off from throwing things at the wall and seeing what sticks. A lot of working therapies and drugs aren't as well understood as one would hope.
Also it's incredibly complicated. I'm thinking of preventative measures, psychosomatic symptoms, rare conditions, varying sensitivity, long term risks and so on.
There's just no easy answer to any of those things.
In a perfect world, you'd have the social control by families and communities combined with the expertise of health care professionals that determine where the line is on a case by case basis.
Well said, 100% this. It's also worth noting that so many things that one might abstractly think of as matters of life and death are being provided by the current system on a "sometime in the next several months if you're lucky" basis. There are surely some aspects of healthcare that can never really have a functioning market dynamic, like emergency care. But the vast majority of medical care is provided not at the speed of cardiac monitor beeping, but rather at the speed of scheduled appointments and billable events. What we really have is one big market failure due to criminal behavior of "insurance" companies (price fixing and restraint of trade) as well as providers (collusion and extortion). No matter who may be ultimately paying, two critical first steps to restoring some patient agency are outlawing "insurance" "networks" and outlawing post-facto billing shakedowns.
Once we stop motte-and-baileying this, then we can have productive discussions that identify cases where market capitalism actually does work and then fortify the cases where it doesn’t.