You don't qualify for FMLA until you've worked there for a year, so yes, they could let you go for taking maternity leave. You also wouldn't have much paid leave, as the feds are notoriously stingy on maternity leave, and 4 months isn't a lot of time to accrue paid leave. However, if they really want you, they may be willing to try and hold your job for you--doesn't hurt to ask. After all, if they don't you're no worse off than you are now.
You should disclose after you have an offer in writing, but before you formally accept. You could make your acceptance conditional on approval of X weeks of leave (likely unpaid).