No, at the time of entry the immigration officer checks whether the passport has 6 months validity or not. At the time of exit through Dubai or any other foreign country, the invalid passport is not considered an acceptable travel document. yoi should renew your passport to leave Dubai.