No, there's no air there really to begin with and farts come from healthy bacteria being released. Being that there's not really any of that in a fetus, it doesn't happen. There is no air surrounding it, only amniotic fluid.
I'm gonna go with NO. Farting is the passing of air through your intestines which is to help aid in the movement of your poop/feces/stool. Infants don't poop until you start feeding them. Therefore they cant fart until you start feeding them.