Yes you can leave and get married and then comeback.
But thesooner the better before the bump shows that is.