Not all Objectivists would agree with this.
Insofar as I can follow the fucked-up, logic-chopping Objectivist worldview, I imagine their opinion on this matter would go like this:
Any kind of government law or programme requiring doctors to treat patients who can't pay would be thoroughly immoral because it would constitute coercion (anathema to Randroids; even when said coercion is just the state ensuring you comply with the social contract you already, voluntarily, agreed to follow). They'd probably maintain this even if the doctor's salary was still paid in full out of the public purse, because, zomg, those taxes would have been taken involuntarily from people. (the fact that, in a functioning democracy, the payment of taxes and their allocation is effectively a group decision apparently doesn't qualify as voluntary to a quite staggering proportion of people, objectivist or not)
The objectivists seem to get around the fundamental sociopathy of this sort of attitude by a kind of "charity clause"; they insist that, while all coercion is inherently evil, there would be nothing at all wrong with an objectivist, who is expected always to act exclusively in their own interest, carrying out uncoerced charitable actions, with no net gain to themselves, for some other reason that they typically don't bother to define. So, in a Randian utopia, there'd be absolutely no socially or legally enforced guarantee that you could get free medical treatment if you couldn't afford it but that wouldn't matter because, if you went to some private, free-market ER anyway, the doctor might just treat you for some reason other than simple greed. The Randroids rarely provide any solid reason for why he might do this, but the only plausible ones are temporary irrationality (which couldn't happen to a Randian hero, who is consistently rational and totally self centred), or simple human decency and empathy (although that sounds exactly like altruism, Randroids will probably insist that it isn't)
If the world were filled with entirely rational people, infinite resources and no bad luck whatsoever, objectivism could function. If all those people also had a decidedly un-Randian streak of empathy and kindness (which Objectivism seems to simultaneously denounce as evil and also quietly allow for periodic bouts so as not to appear unavoidably sociopathic), then it might even be bearable for those who, by unlucky fault or by circumstance, couldn't survive in it without help from others who they could not repay.
In reality, resources are scarce (so it's entirely possible for a Randian hero, working entirely in self-interest, to deplete an area of resources utterly and force hardship upon others - it's hard to see how this wouldn't qualify as coercion), people are only fitfully rational (and thus need coercion by others acting in the rational, group-decided interest to remind them during periods of irrationality what they should do, and agreed they should do during rational interaction), and the population can be remarkably altruistic and concerned for the wellbeing of the society in which they live, not just themselves - which is why we sometimes decide, as a group, to vote for socialist policies such as nationalised healthcare, which to the superficial observer appears to be nothing more than government thugs stealing your money to care for people you've never met, but is in fact (in a functional democracy, at any rate) people enforcing a decision you yourself helped make (even if you voted against it, you condoned the decision made by condoning the democratic mechanism itself), and resorting to force in order to ensure compliance by those supporters who, for reasons of temporary irrationality, suddenly don't want to pay or work for the decisions of the state they previously agreed to support.