If this is the fixed term contract that you previously posted about then they can refuse if there's no provision in your contract. However, in practical terms, they would probably let you go but may look for you to mitigate their losses i.e ask you to pay towards the recruitment/training of a new employee. Depends on the employer and what's in your contract.
Employers are also in their rights to refuse your resignation if you are in the middle of discliplinary action - although many choose not to enforce this.