Are you in the US? If so, insist on an IEP. Attendance CAN be included in an IEP. As in the child can be excluded from whatever the demanded level of attendance is if that is in the child's best interests. I would make sure that the doctors treating your child's autism know that after the school gives your child a hard time, your child needs some time to recover.
I also STRONGLY urge you to look into Sensory Integration Disorder. This is something that is part of autism. An Occupational Therapist would test for this. I suggest a private Occupational Therapist (OT) because they look to see how this would impact his whole life and not just his time at school. It is important info that you NEED to have. Sensory Integration Disorder (SID) means that your child's brain does not process input from his senses the way that "normal" people do. The world is pretty much "too". Too loud, too quiet, too still, too much movement, too much pressure, too little pressure, everything is TOO. This is something that he needs to learn to handle because it won't ever go away. In fact some parts of it will get stronger as he gets older. I know because I have it too. Lots of times it feels like the world is attacking me.
The Occupational Therapist (OT) can do quite a few things to help. Brushing therapy can do amazing things to help teach the brain to handle sensory input in new ways. A sensory diet can help your son cope better with sensations that are a problem for him. Sensory breaks in his day can help keep him calm. My oldest child had fidget items written into every IEP he ever had. When teachers stopped taking them away while they lectured, they discovered that my son actually could process what they said = but only if he had something to do with his hands. Otherwise he doodled and his mind got caught up in what he was doodling (and 12 other things).
My youngest son had very bad Sensory Integration Disorder (SID) as a child. He could not handle going to school every single day. I knew he couldn't cope, but school said he had to go. I sent him one day when I knew he was overwhelmed. He wasn't there an hour or so before they called me to come get him FAST! He freaked out his entire class and every adult who saw him. He was shaking like he was cold, and curled up under a table. His eyes were open, but he didn't respond to any of them. I went up to school, but I didn't rush.
By then the principal and the attendance secretary were in the classroom. I explained that this is what happens when he is overwhelmed, and it happens about every other day. He went to school for a day (half day as this was preK) and then spent a full day like this. It was part of why I was a stay at home mom. They said that they would just ignore his absences and I could keep him home as often as I saw fit. When he was in 4th grade I was absolutely thrilled because he only missed 1/4 of the school days in the year! By 6th grade he was only missing days when he was sick.
The school may fuss over modifying his attendance in his IEP. You may have to encourage your child to show how miserable he is to the school. If that means he throws up and calls you to come get him, have him do that. If that means he has a meltdown like my son did, that is okay too. The IEP means that he gets protection under the law. It means they can only punish him if the behavior is not a manifestation of his illness. So if what he does on days he is overwhelmed is due to being overwhelmed, and is how he shows he is overwhelmed, then there is a limit to what the school can legally do. You may have a great fight enforcing this, but this is what the law says.
I would push for the occupational therapy assessment, and for the IEP evaluation. If you need to request one, know that you MUST send the request by mailing it using certified mail, return receipt requested. THis means that the school must sign for it. Otherwise you cannot prove when they got the request if you end up having to take them to court. (Usually just threatening this is all need and that is way down the road, but you have to take the right steps from the beginning. Plus schools routinely just ignore requests unless they come this way, at least here they do.) This also puts into place a timeline for them to get their testing done and it puts protection into place for your son while they are testing.
I hope this helps!