You can take Duphalac syrup. I took this in my first trimester when I was struggling with constipation. it’s a gentle stool softener that was prescribed by my gynae at SGH. Did you let your GP know that you are pregnant when he/she prescribed Dulcolax? Else you can always call the clinic to clarify.
It’s best to show your gynae and speak to your gynae. What may be ok for others may not be ok for you. You can talk to your gynae about your constipation issue too.