>The problem is, it leads directly to the conclusion that "if you don't have any money, you shouldn't be entitled to any medicine."
You are not entitled to anything from anyone even if you do have money.
I'm curious if you've been following the popular show, The Handmaid's Tale. If you haven't, it's a show in which the human race is facing potential extinction because women are becoming infertile. To solve this problem they essentially enslave and repeatedly rape fertile women in the hopes of increasing the population. Now obviously this is an exaggerated scenario, but by what moral principal would you suggest that it's wrong to to enslave and rape women to save the human race? And why would you not apply that same moral principal to a surgeon and an individual patient? Does the moral principal no longer apply simply because the scale is different? What level of coercion are you willing to apply to the surgeon? If he won't help a bankrupt person will you remove his license and create an additional bankrupt person? That doesn't seem to be beneficial to society at all.
The moral thing, of course, is for the surgeon to spend some portion of his time aiding those who cannot help themselves. And the moral thing, of course, is for all of us to help those who cannot help themselves by either providing our own time/labor or perhaps funding the surgeon so he can perform more "free" surgeries. Some people will certainly choose not to aid others, but that doesn't justify forcing them against their will.