It appears the dog has a urinary infection with possible cystitis
. Since difficulty pooping, there may be possible prolapse of rectum
if it has been constipated for long. This can cause damage to urinary tract
also. Her Veterinarian should look for this possibility and also for possible urinary stones.
After course of antibiotics gets over, she needs to be watched for improvement. If none noticed, she needs a thorough examination of abdomen and genitourinary tract including Ultrasound
study to look for any prolapse or malformations.
Her diet needs to be with roughage, plenty of fibre. This will enable smooth passage of stools. Avoid red meat.