For instance, she points to both over-the-counter and prescription anti-inflammatory drugs like ibuprofen and aspirin, which can cause irritation of the stomach lining and even stomach ulcers. Elliott advised avoiding medication-induced stomach problems avoid taking over-the-counter drugs for extended periods of time.