Hmm. This is a tough one.

First, you should check state laws. There may be state health laws or regulations that prohibit attendance by children who aren't toilet trained. I know that private schools require that children be fully toilet trained as a typical condition of enrollment. So it's at least legal for them in the absence of regulations. Plus, kindergarten isn't mandatory in 35 states, so if your state is one of them, they may be able to set a similar requirement, regardless of any kinds of laws.

Second, AFAIK, teachers aren't allowed to change a soiled child. This makes sense. Also, what's going to happen if you can't get to school and you can't leave your son at home (say you have the flu or have an emergency and can't go to school)?

Third, I realize that you've said he has a confirmed medical condition, but children with other confirmed medical conditions aren't allowed to go to school either (e.g. infection with a stomach virus or other highly infectious diseases).

Finally, and I know this is hard, try to see the situation from the school's point of view. Your son has a condition that can easily affect the health of other people in the school. Not to mention other considerations. Personally, I don't think that this situation calls for a "Mama Bear" approach. I think that a gentle approach and a healthy appreciation of the other guy's point of view is more of what's needed.

This is all just my opinion!