Do the company have the right ?????
Morally .......... NO (since they did not bring you here)
Legally ...........YES ( since they are your sponsor )

years ago, my husband would have faced this same problem. But before joining, he had cleverly made a clause in the contrct "in case of termination / resignation, you will be given release or NOC"

he still working here.