Defending yourself means trying to stop something happening. Kicking back on purpose is retaliating.
All well and good, in a single isolated example. For example if I was on a bus and someone punched me once on the shoulder. My best bet would be to ignore it and place myself in a position they couldn't do it again, probably by informing the driver.
However, at school, you're forced to sit next to/be with the same people every day for years.
If the person doesn't like you, hits you, and gets no response, THEY WILL KEEP HITTING YOU.
In this case, a kick to the shin serves as a fair warning that if this person tries to punch your son again, he will get kicked again. THIS is self defence when you measure it over the DS's future school career. Not only that, but all the other boys and girls present in the room will have noted that DS is ready and willing to attack back when attacked. This means that everyone in that classroom is now less likely to punch DS.
I'd take that as a win. The teachers have to be seen to enforce the rules, but your DS was 100% morally in the right. He is now much safer for the next 8 years than he otherwise would have been. Just make sure that he understands the crystal clear difference between this and kicking someone for other reasons that aren't a direct response to violence aimed at himself.