Is it safe to get or have a belly button ring while pregnant?

Yes. I will tell you though the skin over the ring will get very, very thin as your belly stretches. The ring may pull through on its own. Most women take it out as they hit the third trimester for that reason.
Generally yes. The physical act of piercing is not something that should affect pregnancy outcome. However, because there can be complications and your belly button will undergo some changes during pregnancy i would recommend avoiding any unnecessary procedures. Wait until after. Already having a piercing is also not likely a problem but you may need to remove it if depending on how your navel changes.