It depends, if your contract is for one, two or three years. If it is for one year, you can request an NOC from the HR. If your contract is for 3 then you need to wait for 3 years before you can ask for an NOC

It also depends on what is mentioned in your employment contract about the transfer or NOC