No. The headlight itself is not part of pedestrian impact rules. Part of it is the surrounding frame of the headlight and if the headlight stretches to the top of the fender (like the old Nissan Quashqai). Check UN-ECE R127, section 2.5 and appendix 5 which defines the single tests (
https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX:42020X0638 ). You can find all tests which must be performed for pedestrian safety. Where no test exists there is also no reference. Without a reference you can not tell is it legal or not. That means: no test = no refrence = not part of the pedestrian impact rules.
However, such guards may break other rules, like the general requirement to prevent hazardous sharp edges, parts etc. You also have to retain a certain radius when things are bend (like the bars), it is not allowed to protude a certain length etc. etc. In additon material tests might be necessray, if parts splitter, how do they behave? To they become a threat, etc.
But in general the aftermarket has some more freedom than a car manufacturer has.
AWo