...I'm sorry this happened to you. I think it's pretty crummy that your manager and facility don't try to help you....I truly don't think they can "demote" you when they made the decision to remove you from the class they require because the made a scheduling error.
I am not a lawyer and we cannot offer legal advice but......I had similar thing happen to me once....I was on medical leave (I had a simple surgery)and my ACLS expired. My boss and educator called me to tell me I couldn't attend the present class because I was still on leave, I couldn't come off leave, because if I did....... I had to return to work and my Doc refused to remove my lifting restriction. They told me I couldn't return to work until I was re-certified and the next class was 3 months away...in January. SO I needed to find away to return from leave or not work until January and they couldn't "guarantee" my position. I could take the course else where but it was policy that they didn't pay their employees to seek training else where when they provided the services.
There are federal labor laws about this stuff...I called the EEOC and my States Attorney Generals office......It was amazing.......
within 2 days they called me back.........they suddenly had not only space but would pay for me to go elsewhere and my position was never in jeopardy.
A well place phone call can never hurt.