There isn't full agreement on whether the soul has a gender, although a common view is that the soul does not have a gender. However one can deduce from Qur'an and hadith that we will appear in the afterlife similar to how we appear in this world including gender. It is said that the soul is affixed to a sort of body in the afterlife (less "heavy" than the physical body but still a sort of body) and so perhaps this is why it will appear gendered.
[Edit: Hereby is demonstration that there is no agreement on the matter! In tafsir of 4:1, Allamah Tabataba'i expresses the view that the Qur'anic reference to creating the "nafs" of a person and its mate is the compound of worldly body and soul, not the soul in and of itself or what persists after the worldly life.
However, it should be said that there have been multiple trends of thought in the Islamic world regarding the nature of the soul, and some scholars accept some views - like Molla Sadra's - whereas others do not. As for non-Islamic sources, while it is true that extra-Islamic philosophical ideas were introduced to the Islamic world early on and became part of Islamic thought, just because something is extra-Islamic does not automatically mean it is wrong. For instance, pre-Islamic sources also say that 2+2=4, and we do not disagree with that. What can be said is that non-Islamic sources cannot be taken as proof of matters known through revelation, although one could consider the logic presented in them.
In any case, this may not be what the question is actually intending to ask, because it seems that the question is aimed at asking whether we will appear gendered in the barzakh and heaven/hell. From the Qur'an and hadith, it seems as if we will appear recognizably gendered, regardless of whether or not that is an inherent nature of the soul. In any case, we will all find out.
In contrast, some people ask whether the soul is essentially gendered because they have an interest in questions such as the position of women and men spiritually in Islamic thought.
An interesting read on the spiritual aspects of gender in the Islamic, including Shi'i, tradition is _The Tao of Islam_.]