"With immediate effect" means you are not on the job anymore after receiving the termination letter from the company. The company does have the right to refuse you NOC even if such an incident had not taken place. The issuance or rejection of a request for NOC is totally at the discretion of the management of a company. Since you will no longer be in employment, you may be asked to hand over your job responsibilities to some other person. Should you refuse to do so, the company may hold back a salary but you can always approach Human Rights Committee or the Labour Office for assistance on this or any other issues with regards to settlement of final dues and exit.