I have bought this Bontrager rally helmet and I was wondering if it does any harm to it if it gets wet eg. In the rain
Of course no, it doesn't do any harm that the helmet gets wet in WATER.
It is made of various plastics, which per se are insensitive to water, and also it is supposed to be worn even though the cyclist is cycling under rain or snow.
Also, your sweat is basically water and some salts. If water was dangerous to helmets you should not sweat when wearing them :)
Just avoid that it gets wet by organic solvents (acetone, benzene, etc.), as they might attack some of the plastic and drastically alter their mechanical properties, leaving to your head the same protection offered by a shopper. The advice to not paint or put stickers on the helmet comes from the above point, as some paints or glue can contain non suitable solvents.