What your school has said is illegal.
Ask to see their policy, and ask whether it complies with the Equality Act 2010.
If such a policy exists, and states what you says, it cannot comply with that law and therefore you can challenge it.
Extract from the Act:
The responsible body of such a school must not discriminate against a pupil—
(a)in the way it provides education for the pupil;
(b)in the way it affords the pupil access to a benefit, facility or service;
(c)by not providing education for the pupil;
(d)by not affording the pupil access to a benefit, facility or service;
(e)by excluding the pupil from the school;
(f)by subjecting the pupil to any other detriment.
for any reason associated with their disability, directly or indirectly.
Incontinence, whether direct or indirect (ie whether stand-alone or as a result of a wider disability or condition) is considered a disability for the purpose of the Act and therefore children cannot be denied access to a state-funded educational setting such as a school nursery, and parents cannot be required to come and change a child, because this is discriminatory.
The parents on this thread stating that such discrimination is 'normal' should be ashamed.