Praise be to Allah, and may Allah’s peace and blessings be upon the Messenger of Allah, his family and his companions.
As to what follows:
In response to your question, we say, and with Allah Almighty lies all success:
As for these hand creams, I do not see how they are water resistant if they are regular creams, as the skin absorbs them and there is no layer left to prevent the passage of water.
As for what is used in separating hairs or holding them together, and whatever is used for hair styling, and may be resistant to water; then what is apparent to me, and Allah knows best, is that there is no harm in it. It is resistant, and at times prevents passage of water, but it is well known that it is permissible to wipe over the head, and also pour handfuls of water over any barrier in the hair when bathing after sexual impurity. As Umm Salamah had asked the Prophet (peace be upon him), “Should a woman undo her braids when bathing after sexual impurity?” So he said, “No.” This proves that it is not mandatory to undo braids when bathing, even with the likelihood that water will not reach inside the braid. So this implies that what is mandatory is the water reaching the head, and what is required is the pouring of water over the head. Anything more than that is Sunnah.
So what is apparent to me regarding these creams that are used for separating the hair, and are left in for a certain period, is that there is no harm in them Insha Allah. Better yet, to be on the safe side and to avoid unclear matters, they should be avoided.
But in regards to permissibility and impermissibility, the Prophet (peace be upon him) performed Hajj with his hair wrapped, having held the hair together by wrapping it in honey or sticky paste. This is how the scholars have described it. And it is understood that the Prophet (peace be upon him) would need to bathe. So wrapping the hair did not prevent from pouring water over it or using it while in this state for the duration of the Hajj of the Prophet (peace be upon him).
As for if a layer of cream is applied to skin, then the layer should be removed and the place washed.
As for the previous prayers that were performed without removing the layer of cream, then if it was out of ignorance, there is no harm Insha Allah.
And Allah knows best.