My University Rejects Online Course Credits...Is This Allowed?

I recently had to go on medical leave due to a car accident and am very low on credits.
Instead of having to graduate late, I thought I could maybe take some online courses and transfer the credits in.
However, I was told by my dean that my university does not accept any online course credits.
It does not matter if they are good courses from accredited universities, they will not even consider them and have a zero online course credit policy.
This was really bad news to me, and I just wanted to know if universities are allowed to do this?
Is there any way that I can argue against this decision?

One idea is to take some online courses anyway from an institution where they have told me they do not specify that a course is online on their transcript. (University of Colorado)
This seems a little risky though.

Yes, universities are allowed to accept and/or deny credit based on whatever policies they see fit. I find it very strange in this day and age that such a policy exists, but apparently it does.

Which university, if you don’t mind saying?

Washington University in St. Louis.

Do you think I would be successful in trying to disguise an online course as a normal course?

Sarah Lawrence says no credit for online courses. USC says none for foreign language or lab science.

I think lying is a TERRIBLE idea.