Yes and no.
If they are enforcing it against all boys, then that may make it seem unbiased. BUT, when a policy - even (and especially) when "neutrally" applied - has a strong disparate impact on a minority class, that can be a racist policy.
For example, imagine a policy that bans all tattoos, visible or not. Seems neutral. But if the school has several polynesian students who genuinely believe and practice their ancestral faith, tattoos are a part of that. So the policy, while neutral, has a disparate impact on polynesian males.
Dreadlocks on a black male may be an iffier proposition (there is likely not a religious component), but it's still a culturally significant/important expression (and it is in his case, being Trinidadian). Of course, then the dirty hippie next door could argue the same thing about his unkempt blond mane. So, it's not always an easy call.
But the kid appears to be a good kid, and most importantly, they CHANGED the code on him. He'd complied with the previous version by putting his hair up. They should either go back to that version, or grandfather in a student who grew his hair out under the old code.
Short version: dumbass rigid rules lead to dumbass results.