Hi! Many thanks for your question on eHealth forum!
If you have a history of unprotected sex, then take a pregnancy test, preferably a blood pregnancy test for confirmation. Low back aches can also be due to pelvic inflammatory disease or due to fungal infection or a STD. Hence get this checked by a gynecologist.
Heartburn, if not due to pregnancy needs to be treated with antacids and Omeprazole. Since a confirmed diagnosis cannot be given on net please discuss these possibilities with your gynecologist once. Hope this helps. Take care!