Hello, thanks for posting your query to H.C.M. C.
During urination if pain is there , it might due to urinary tract infection
Stomach pain is also but it may happen a refer pain from U T I.
Desire of defecation usually associated with U T I .
So consult a doctor and get in U/S of whole abdomen to rule out any disease in effected area.
Urine and blood examination will also highlight the disease.
Good luck Dr. HET