Hi, I've actually worked on the ibuprofen drug for pharmaceutical companies for a number of years so I know a bit about it. Ibuprofen does have a high possibility of irritating the stomach and can cause bleeding/ulcers. Whenever you take ibuprofen you should always take with food, after rather than before, to make sure the lining of the stomach is protected.
Ibupfrofen/Naproxen/Diclofenac are all the same family of drug (NSAIDs) so have the same effects on inflammation, but also the stomach. They are different family to paracetamol and codeine which is why they can be mixed.
The best pain relief plan is to start taking ibuprofen before your period starts to keep inflammation down, and then once you have pain to take paracetamol and ibuprofen in alternate combination. So normal paracetamol dose then 2 hours later ibuprofen, then 2 hours later paracetamol and so on. Just be careful not to overdose in the 24 hour period, especially with the paracetamol. There are actually drugs out there for this that contain both paracetamol & ibuprofen, but its acutally better to have the delay between the doses rather than take one tablet combining the 2, it gives you more coverage over the 4 hour period.
As others have said some people are more affected by the side effects of ibuprofen than others and some are just intolerant. So you might just be one of those unfortunately.
Hope that helps anyway!