According to Jewish thought, do animals have the self-awareness to know that they exist? Do they know that they are animals? Does an animal differentiate itself from other animals?
"There was a calf which was about to be taken for slaughtering, and it ran away, and put its head under the garment of Rabbi (Yehuda HaNassi), and cried. And Rabbi answered: 'Go; you are created for this purpose'. Then it was said by Heaven that, as he has no mercy with creatures, he shall be afflicted with chastisements." (Babylonian Talmud - Bava Metzia 85a)
This medrash, if taken literally, suggests some level of awareness on the part of the calf, perhaps related to your question.
Also (perhaps less relevant): "They further questioned: Why does the dog know his master, and the cat does not? and his answer was: It is certain that he who eats from what is left by a mouse is apt to have a poor memory, so much the more so the cat that himself consumes the mouse." (Babylonian Talmud - Horayot ch. III)
Animals seem to know things outside themselves Yeshaya 1(3)
An ox knows his owner and a donkey his master's crib;
On which Rashi comments:
Heb. קֹנֵהוּ [is] like מְתַקְּנוֹ, the one who affixes him to the plowshare for plowing by day, and since he has accustomed him to this, he knows him. The dull donkey, however, does not recognize his master until he feeds him.
Rashi's comment might suggest that self-knowledge is unlikely in animals.