Can bacteria in your stomach cause you not to be pregnant?

No. The bacterial flora in your stomach have no relation to fertility in men or women.
Maybe.. Pubmed search reveals several articles from japan that suggest a causal relationship of h.Pylori to infertility. There may be a link between helicobacter & polycystic ovary syndrome (pcos). Lastly, a 2011 study indicated a link between infection with caga-positive h. Pylori strains & an increase in women's potential to abort early (possibly through increased release of inflammatory cytokines).