The wife of a friend of DP asked me this at the weekend. I am, as it happens, but we'd decided not to tell anyone for a few weeks until we know more. I'm just three months. Unfortunately, I have terrible bloating, so wasn't hiding it well. 
But seriously, if we wanted someone to know I'm pregnant, we would tell them. Why would you ask? The answer can only be "no" or "yes, but we didn't want to tell you yet".
I had terrible stomach problems a few years ago with h. Pylori and the amount of people that asked me then too was very upsetting. Made even more so by the fact that we were TTC but not succeeding.
So AIBU to think it's very rude to ask if someone is pregnant f you don't have a very specific reason* for needing to know?
*eg medical, a very very close relative, or the person has a head hanging out of their fanny