There is a risk the lady isn't pregnant at all and you offend, or if she is pregnant, it will make her feel very self-conscious about her changing body shape. If she is pregnant, let her tell you when she feels comfortable. Most couples don't share their good news until they have their first scan around week twelve.
One thing is for sure - saying thank you is a nice thing to do. It makes you feel good, and makes the receiver feel valued. We may not subscribe to the hand written parchments of old, with ruler straight lines and wafty words of gratitude penned from inky quills, but we do still subscribe to basics of liking to give and liking to be thanked.