Brahmanas, Kshatriya, and Vaishyas all undergo Upanayanam as early as 7 years of age. Having done Upanayanam, they become Brahmacharis.
One important vow of Brahmacharya is maintenance of celibacy, meaning no intentional emission of semen (masturbation or sex).
Here is what the Manusmriti says:
Persons learned in the Veda and knowing the law declare that for the twice-born person keeping up his vows, the intentional emission of semen means a ‘transgression of the vow.’—(120)
This vow is very important to be maintained, as stated in the next verse:
The spiritual power of the Religious Student, who has become ‘immoral,’ ‘goes away into the maruts, indra, Bṛhaspati and agni.—(121)
In fact, that's the reason given in the Apastamba sutras as to why no Rishis are born in kali yuga:
The word 'austerity' (must be understood to apply) to (the observance of) the rules (of studentship).
If they are transgressed, study drives out the knowledge of the Veda acquired already, from the (offender) and from his children.
Besides he will go to hell, and his life will be shortened.
On account of that (transgression of the rules of studentship) no Rishis are born amongst the men of later ages [Kali yuga].
So my question is, do the Gurukulas, Patashalas, and Acharyas in today's time tell young Brahmachari boys not to masturbate or look at porn?
If you personally, or know someone who, went to a vedic school themselves, or a Gurukula, or studied under an acharya traditionally, and give an answer from their experience, then I'd accept it as an answer.