Is it safe to go skating while pregnant?

Yes. Use common sense when pregnant and as long as you know how to skate, you should be fine. Avoid falling and have fun.
No. It depends on how good you are. If you have no real risk of falling and hurting yourself then I suppose you could do it until about 5 months. After 5 months your center of gravity changes and your sense of balance is not the same.