Yes, either employer or employee can terminate the contract before the notice period has ended.
However, they have to pay the other party salary in lieu of notice (‘notice pay’). This should be equivalent to the salary the employee would have earned during the remainder of the notice period.