Hello Julia, Sorry about this problem. She may be having some pain at anus making her hold back, so please use an ointment containing xylocaine anesthetic to act locally (every 3-4 hours) and remove any discomfort. An X ray film of abdomen may be taken to find out any fecal masses impacting colon, for which an enema may be needed.
Examination by your GP with a finger in rectum also may detect any impaction.
In such situation any oral medication will not help.