Potentially, yes. In order to buy a marketplace plan, you must have a qualifying immigration status, such as permanent residency (green card), certain types of visas, or refugee status. You can find more information about qualifying statuses here.
If you are not lawfully present in the U.S., you are not eligible to buy a plan on the health insurance marketplace. However, you can shop for individual health insurance outside of the marketplace. To obtain coverage, contact a state-licensed health insurance company or a licensed agent or broker. Your state Department of Insurance can help you find one. (45 C.F.R. § 155.305).
A previous policy instituted by the Trump administration expanded the definition of a “public charge" for immigrants applying for admission to the U.S. or permanent residency (green card). That rule is no longer in effect. Enrollment in health coverage programs such as Medicaid (except for institutional long-term care) will not impact public charge determinations.