Awwww, I'm so sorry that happened to you. I had a similar experience recently and decided that I was just going to let the other person sputter and feel the embarrassment that she had earned for herself.
I was at a reception when someone I new only as an acquaintance came up to me and said "I'm going to make a faux pas." I just sort of looked puzzled, because at that time I didn't really clue in to what was coming. Then she asked if I was pregnant. I gave her a flat, abrupt no, then said nothing. She started apologizing and said "oh, it's just that you've gained so much weight"
The whole time she tried backtracking I just stared at her with a neutral expression and said nothing but "hmmmmm" I'm sure she was uncomfortable, but I didn't care.
I wish now that when she said she was going to make a faux pas, I had stopped her. Sigh, just when I thought I had gotten to the age that I could wear whatever I wanted and people would know that I was too old to be pregnant.
I know how hurtful it is, but I agree with NyaChan that you handled it the best you could. My way was probably not great, because she ended up explaining to me how fat I was and how much weight I'd gained.