They will operate on you before bub is born or after. I doubt they'd want you to have a preterm bub AND an operation. :'(
I had to have my gallbladder out, but they ignored my symptoms. I had it out 6 weeks after my son was born.
If it's life threatening, they will probably try to remove it, but if it's appendicitis, they might wait until you've had bub to have it out.