Prior to October 2019, 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). See this USCIS page as well as this section of the Foreign Affairs Manual.
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.
There is an upcoming rule (see the proposed rule here and final rule here), taking effect October 15, 2019, to change the way that inadmissibility for being "likely to become a public charge" 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. 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. However, it excludes Medicaid used by pregnant women during the period of pregnancy and up to 60 days after the pregnancy (see this paragraph):
For purposes of this final rule, DHS has excluded consideration of the
receipt of Medicaid by aliens under the age of 21 and pregnant women
during pregnancy and during the 60-day period after pregnancy.
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 October 15, 2019. So Medicaid she may have received in the past, even if not during pregnancy, would not be considered even if she doesn't immigrate until after this new rule takes effect. (See this paragraph:
In addition, and as stated in this final rule, DHS will not apply the
new expanded definition of public benefit to benefits received before
the effective date of this final rule. Therefore, any benefits
received before that date will only be considered to the extent they
would have been covered by the 1999 Interim Field Guidance.
And the proposed 8 CFR 212.22(d):
(d) Treatment of benefits received before October 15, 2019. For
purposes of this regulation, DHS will consider, as a negative factor,
but not as a heavily weighted negative factor as described in
paragraph (c)(1) of this section, any amount of cash assistance for
income maintenance, including Supplemental Security Income (SSI),
Temporary Assistance for Needy Families (TANF), State and local cash
assistance programs that provide benefits for income maintenance
(often called “General Assistance” programs), and programs (including
Medicaid) supporting aliens who are institutionalized for long-term
care, received, or certified for receipt, before October 15, 2019, as
provided under the 1999 Interim Field Guidance, also known as the 1999
Field Guidance on Deportability and Inadmissibility on Public Charge
Grounds. DHS will not consider as a negative factor any other public
benefits received, or certified for receipt, before October 15,
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.