Can I take a stool softener?

I haven't used the bathroom in days and my mom said I shouldn't take a stool softener because I'm pregnant:/ is that true ?