Prior to February 24, 2020, there was no ground to deny someone a visa or deny someone entry based on having used Medicaid. There is a ground inadmissibility if someone is "likely to become a public charge", but the determination of that did not consider non-cash benefits like Medicaid (except Medicaid for long-term institutionalized care).
She was denied entry for failure to overcome the presumption of immigrant intent. The presumption of immigrant intent applies to most types of nonimmigrant visas, and it says that the officer must presume the person is an immigrant, and thus ineligible for the nonimmigrant visa, unless they can prove otherwise. This is a generic reason used to deny visas when the officer feels that there is any factor in the applicant's situation they do not like (but there is not necessarily another ground of inadmissibility that applies), because, the theory goes, the negative factor makes it harder to convince the officer that you don't intend to immigrate. This ground of inadmissibility doesn't apply to immigrant visas, so you don't have to worry about that.
A new rule, effective February 24, 2020, changes the way that public charge inadmissibility is determined, and this could affect her ability to get a visa or to enter the US, but her use of Medicaid still wouldn't be relevant. Although one of the changes is that it considers more types of "public benefits" than before, including Medicaid, which is considered a "heavily weighed negative factor" if used for more than 12 months cumulatively in the previous 36-month period, no type of Medicaid that a nonimmigrant like your girlfriend could have received would be considered under the new rule. As a nonimmigrant, your girlfriend would have generally been ineligible for Medicaid, except Emergency Medicaid, or, in some states like California, Medicaid for pregnancy-related care during pregnancy, and Medicaid for children under a certain age (e.g. 26) funded exclusively by the state.
Emergency Medicaid, as well as Medicaid used by pregnant women during the period of pregnancy and up to 60 days after the pregnancy, are not considered under the new rule (see this section):
USCIS does not consider the following Medicaid benefits for purposes
of the public charge inadmissibility determination:
Benefits paid for an emergency medical condition;
[...]
Benefits received by a pregnant applicant, including the period during the pregnancy and 60 days after the end of the pregnancy.
Medicaid funded exclusively by the state is also not considered under the new rule (see this section):
However, a state medical insurance program, funded exclusively by the
state, is not included in the definition of public benefit and is not
considered as a public benefit in the public charge inadmissibility
determination.
For example, some Medi-Cal services are provided to aliens under a
state-only authority at no expense to the federal government.
If Medi-Cal is provided to the alien under a state-only authority at
no expense to the federal government, it is not considered in the
public charge inadmissibility determination.
In addition, the consideration of additional benefits is not retroactive -- non-cash benefits that were not considered under the previous rules, including Medicaid, are not considered under the new rule as long as they are not used or received after February 24, 2020. So non-cash benefits she may have received in the past, even if it was a benefit that would be considered under the new rule, would not be considered even if she tries to immigrate after this new rule takes effect. (See this section:
Public Benefits Received Before February 24, 2020
USCIS does not consider public benefits that were previously excluded
under the 1999 Interim Field Guidance (PDF),[63] if received before
February 24, 2020.
And in the table:
Benefits excluded under the 1999 Interim Field Guidance
Example: SNAP, Housing Programs, Medicaid (generally)
[crossed with:]
Benefits received before February 24, 2020
[result:]
Not considered
Some of the other changes in the rule include mandatory consideration of factors like age (below 18 or above 61 is a negative factor), health, family status, financial resources (household income should be above 125% of poverty level), and education and skills. If she were to immigrate after the new rule takes effect, she would be subject to these considerations in determining whether she is inadmissible for likely to become a public charge. However, she is probably in working age, so that's not going to be an issue. And if your income is above 125% of poverty level (which you need to in order to sponsor her, unless there is a joint sponsor), that means her household income is too, and so that shouldn't be a problem either.