If the employee is prepared to pay for their notification period, then I don't see why the company can compel the employee to still serve their notification period. However, it depends on what was stipulated in the employee's terms and conditions of employment, i.e., the agreement. Usually, some companies require their employees to give ample notice of intent to resign, especially if they are in sensitive positions. This is because the person may be required to hand over to their successor, or the position is such that it cannot be left vacant until a replacement is found. Some positions are also difficult to recruit for at the same time.
The company may be right if, as part of the agreement, it was stated that only notice may be given with no stated condition of pay in lieu of notice by either party. Such organizations do that because of the cost of resources utilized in training employees in certain positions, and hence they need to get their money's worth.
So in answer to your question, there is no legal binding from a court of law stating that a company can compel its employees to work their notice period. However, if there was a provisional clause from the onset in the employee agreement, then I'm afraid that, in itself, may be considered binding.