Your doctor could have been talking about a few different meds, called Proton-Pump Inhibitors, or PPI's for short. They stop your stomach from making too much acid in hopes that it won't splash up into your esophagus and bug you. They are Pantopazole (Somac, Protonix), Omeprazole (Prilosec, Losec), and Esomeprazole (Nexium). The OTC names change depending on where you are.
You can definitely try taking PPI's and see how you feel. Are you in the US? If so, maybe look up the new health care laws as they might help you. I know for sure in my home state (California) there were programs in almost every county to help people under 21 with no insurance. It doesn't hurt anything to call the hospital billing/insurance department and ask! :)
Take care, and keep us posted.