Welcome to the forum. I'm no doctor, but my mother and I both had the experience of heart pain in upper left side of our backs. Since the heart and the esophagus and stomach are connected by the vagus nerve, not to mention being in contact with just a thin wall between them, there can be some irritation of the heart caused by the stomach. This could possibly cause the feeling of pain in the back when you get some gas.
I used to get gastric (stomach) reflux which then caused tachycardia when I ate any "trigger food" (foods to which I have an allergy/sensitivity). Often this was accompanied by gas in my stomach. I could often get rid of it by coughing or forcing up a burp or doing a "valsalva maneuver" (pushing down hard like straining on the pot).
There are no blood tests specifically for gastric reflux. The doc was likely ruling out other things. Ranitidine, as Joy said, isn't very strong and it doesn't last too long. There are OTC proton pump inhibitors, some lasting 24 hours, but don't take them without your doc's OK. You do need him to make the diagnosis!
If you do have GERD you will want to find out the CAUSE of the refluxing. Just minimizing the acid in your stomach may take away the esophageal irritation, but it won't do anything for the reflux. You'll just have non-acid reflux. To find out your triggers, if you have any, you'll want to take a look at your medications and start a food log. I didn't know my problem was food allergies/sensitivities/intolerances until AFTER I had a heart attack brought on by eating a bowl of cereal with yummy fruit - which were sulfited and triggered reflux which triggered coronary vasospasm.