Surely they can't make you work, right? That's called slavery.
What they really don't want to do is to lose the billable position. In practice, a lot of people will just suck it up to the end of the contract and then leave, especially if the contract is less than a year.
In practice, they will probably not do that as the HR team is busy with other things and the lawsuit might be bad PR, although a hiring manager that wants to get back to you for doing that might have the HR department sue you, legally they could do that.