You have finished 5 months, you are out of probationary period in an unlimited contract. In an unlimited contract, you can any time put your resignation but it should be approved by the management and you should be deported after the one month notice period. It may take maximum 2 weeks along with keeping your salasry pending until the period.

If the company doesn't allow you to go, you can approach labour court. For this, keep a copy of your resignation letter, if with ackowledgement, thats good.

Then, about your ban.. are you selected from abroad or transfrred from any other companies in Qatar? If latter, no ban will be imposed upon a request. otherwise, you can not reach here in work visa for the next 2 years.