H2 blockers can be used together with antacids?

Of course. H2 blockers (tagamet, zantac, (ranitidine) pepcid) reduce acid production, while antacids (mylanta, maalox) neutralize acid that has already been produced. Talk to your doctor about stepping up to proton pump inhibitor treatment to achieve improved acid suppression, if clinically warranted by persistent acid-related symptoms refractory to the combination of h2-blockers and antacids.