Should you avoid ibuprofen when you have gallstones? I was told they are bad for people with stomach problems. Paracetamol doesn't even touch the pain

Ibuprofen is ok. Ibuprofen can cause stomach irritation or bleeding, especially if you take it frequently or on an empty stomach. However the gallbladder is a separate organ from the stomach and ibuprofen can be a safe medicine for gallstone pain.
Ok to take ibuprofen. Ibuprofen should not affect your gallbladder nor your gallstones. The main reason we advise against long term use of ibuprofen and other NSAIDs is because they can cause irritation of the stomach lining (gastritis) and ulcers. If it is clearly shown that your abdominal pain is due to gallstones, removing your gallbladder may be the best choice.
Ok with gallstones. Ibuprofen or any anti-inflammatory medications can cause gastritis or even ulcers but they will not worsen gallbladder pains or symptoms. As long as you do not have ulcers or heart failure ibuprofen should be okay for you to take for your gallbladder symptoms.
Ibuprofen. Could be taking but has risk of Gi distress if taking for prolonged period. However gall stone pain may require evaluation for complications and may require surgical intervention.