M.S.
She may be holding it because she had a painful bowel movement at one time. This is what happened to my daughter - she ended up suffering from ecopresis because of it and it has been a very long haul that we are still dealing with (she is 6). What your friends daughter is going through is very normal. If it were me, knowing what I know now, I'd let her wear diapers and make sure her diet is healthy, this will ensure soft poops. When a child holds her urine, she may get UTI's when a child holds her bowels, it will get impacted and become very painful to pass. Not sure if she was having issues with pee and poo or just pee but there's my .02 regarding holding poop.
Best wishes,
M.