rules on modifying engines don't stop them being modifyed. they just make it more expensive.
if your not allowed to remove metal from pistons to balance them you just collect LOTS of pistons ane weigh them the find an optimal combonation, same goes for con rods.
tricks can be done to the metering heads to make them more optimal.
cylinder heads may have there ports sand blasted to clean them up
valve guides may have a littel trimming done before there fitted.
hell people may even bother to decode the prossessor in the ecu to adjust things like spark advance and rev limiter