It would help to know where you are. I'm sure in the states that have medical marijuana programs, different counties and towns have different local ordinances about this.
But why WOULD you do something like this, that only has the potential to make trouble for you? Do you really want to spend the opening moments of many of your marijuana highs explaining your legal and medical situation to taken-aback bystanders, perhaps including law enforcement officers? Does it really help the cause of medical marijuana, when you're waving it in the face of everyday citizens, who may or may not approve of it, and might not want their kids being exposed to it?
Are you really that hard up for private places to get chiefed? I've always been able to find places to sneak a toke, even in some of the most weed-unfriendly places.