At the link you will see a photo of two women in US military camouflage uniform. The one on the left is tandem-breastfeeding what appears to be twins. The woman on the right is breastfeeding just one child. Both have made the necessary adjustments to their uniforms to allow their children access.
The woman on the left? Is NOT "baring her breasts to the world", nor is she exposing anymore of her chest than most bathing suits. The actions necessary to get those twins into position? Are NOT equivalent to a man "whipping it out". What DOES equate to "whipping it out" and "baring her breasts"? The kind of thing you see done along Mardi Gras parade routes for strings of cheap plastic beads. Or done by drunken girls at spring break, frequently while leaning out of cars or standing through a limo skylight and hollering "WHOOOOOOOOOOOOOOOOOOOOOO!!!!!!!!!!!!!!!
The actions of BOTH women? Are NOT analogous to a man peeing in public. (Nor to a man defecating in public, which I suspect will be the next analogy made.) It's not analogous to a woman peeing or defecating in public either. Those two acts are excreting bodily waste. Breastmilk, and breastfeeding, are not.
As far as allegations of sexual harassment are concerned, in a civilian court, if one is in a state which has passed statutes guaranteeing a woman's right to breastfeed in public or in private, I doubt you'd have much standing. (Virginia is one such state. I do not have knowledge of which other states have passed such laws, but I know there's more than one other.)
I do not have the slightest idea of what the universal code of military justice has to say regarding public breastfeeding as grounds for sexual harassment, as grounds for a religious person who objects to female nudity to file a complaint, or as grounds for disciplinary action regarding being out of uniform or regarding using one's military status publicly without getting permission from one's chain of command. Military regs are an entirely different animal from civilian law.
It remains my conviction that any regulation, military or civilian, that would prohibit a woman from feeding her child, or merely suppress her actions by forcing her to hide her breastfeeding or her pumping by retreating to bathrooms or utility closets to prevent others from seeing and filing complaints, is WRONG.