Currently health care is very expensive in the United States, especially if you have to buy hospital care without formal insurance. Under ideal institutions, it would be much cheaper, maybe a third of the current price or lower yet (not for everything, though). For instance in Singapore health care expenditures are about four percent of gdp. A libertarian may think that laissez-faire or near laissez-faire is the way to go, while others might favor single payer with price controls, and so on. In any case, in the meantime we are stuck with expensive health care, and for reasons related to bad and coercive government policy.

Now, would a libertarian think that we should cut health care services in prisons, simply because tax dollars are in play? No, the prisoners — many of whom are morally innocent — have nowhere else to go for treatment. When it comes to health care, many potential Medicaid recipients are in essence prisoners, locked into a policy-deficient environment and so they cannot buy quality care at affordable prices. So if we favor health care expenditures for prisoners we might also favor Medicaid expansions.

That said, expanding the current version of Medicaid is unlikely to be a first-best solution, no matter what your broader political stance.

Addendum: Jacob Levy offers comment.