Dear friend getting a NOC is a solely decision of the sponsor or employer.

There is no LAW that will demand the employer to provide a NOC to the resigning employees.

If your behavior in the company has been good you might want to try and talk to the sponsor and see if you can get a deal on the resignation and the NOC.

Otherwise if you quit, and don't have a NOC then you will have to leave the country and be banned for 2 yrs.

Maybe this is not what you expected but is the reality in this country.

Regards!!