Tmi toilet troubles

Beaulieu • Mum and Fiancé. Getting prepared to start trying for our 2nd baby
Hey everyone,
Just looking for a bit of advice. I'm 28 weeks pregnant and for the last couple of weeks I've struggled going for a poo. Last week I was sitting on the toilet for an hour trying not to push much and just relax and let it happen naturally but I ended up swelling down there really badly. The whole of the underneath of me just ballooned. Really freaked me out. The doctor has told me to take lactulose to help soften my stools. This has helped a bit and I'm finding it easier to go although still sitting there for minimum of ten minutes...... But i still swell everytime I go? I'm now completely terrified I'm going to go really swollen when trying to give birth and I won't be able to push baby out. Has anyone else had this ad found a cure?