As Descartes put it, "There are thoughts." From thoughts we are aware that we can doubt what we sense. So, immediately we are aware of the self, and what is not the self.
That's not what Cogito Ergo Sum means. It means that in a state of doubt/skepticism regarding all existence, the one thing we can be certain of is that there is something conscious/thinking; otherwise we would not be conscious/thinking of the issue at all in the first place.
It implies nothing about a distinction between what is and what is not 'the self.' That's a matter of territorial boundary-construction, i.e. of defining borders between self and other, which is an act of mind/culture, not a discovery of something that exists prior to its being constructed culturally and/or socially/cognitively.
With the introduction of lies, one might appeal that they know another better, and as soon as they imply more than themselves, then it is reasonable to assume that the other knows themselves better than the one who knows them. Having said a lie, not being able to know the mind of the other they become muddled. How often are these two talking, how often does one think less than they hear the words of another?
Yes, we are able to perceive others that seem similar to ourselves, i.e. with bodies, minds, speech, etc. but whose thoughts we are not directly conscious of the way we are aware of our own internal experiences.
Nevertheless, you are also not aware of what your hand or other body parts are experiencing except insofar as you feel sensations they are sending to you. When your hand sends out a pain signal, it is similar to your baby crying and so just as you would nurse your hand when it is in pain, you take care of your crying baby by giving it food, attention, cleaning, or whatever.
In this way, our prerogative for self-care extends outward to anything that reaches out to us to communicate. The baby is just an easy example because it is really just an extension of the mother's body that broke off once it developed sufficiently to be able to breath and eat on its own. Ultimately, we are capable of interpreting anything and everything that communicates with us as part of ourselves, including nature and the universe as a whole, which is how we're able to empathize with God the father of the universe/creation in its entirety, just as a child is able to empathize with a parent of whose family the child is a part.