When strangers come up to you and touch your baby bump, you can always simply return the favor and touch their abdomen too. It might shock them, but it will definitely make them think about personal boundaries and their reasons for touching any part of your body. You don't stop owning your body simply because there is a baby inside it. There are t-shirts on the market that say things like "Touch the belly, lose the hand", or "No touching, I bite". If you don't want to wear a silly t-shirt all day long, or such clothing items don't fit well into your company's dress code, making comments along the same lines works just fine too. Saying no or taking a step back when people reach out to touch you is very effective. For more dramatic effect, you can try screaming or saying eeeeeeew... Don't touch my body with those germy hands!
There is an especially presistent group of belly touchers that actually gets upset when you tell them to back off. The best approach with this group is to simply walk away, or threaten to call the police if you feel really uncomfortable. Practicing how to deal with offended strangers who want to impose their will on you is a great exercise for later on, after labor and birth is a distant memory. There is just something about kids that makes people very invasive.