You cannot go into secondment contract without proper approval from your current employer to allow you to legally work with another company under their sponsorship. This is equivalent to getting an transfer NOC from your current employer.

If you can get this then you can also get the proper NOC to come back to Qatar after cancelling and exiting Qatar and no need to go into further ban details.

As I mentioned you earlier their is no ban once you exit the country but for the safe side you can ask your current employer to provide you with open NOC to be 100% sure they do not put any manual ban for you for not joining competitor companies and this ban can be for 2-5 years period.