Thats true for any stalking animal, right? They know they see the prey but are not seen, and if seen, they know the prey will flee.
Showing yourself on purpose to change what you think the other animal thinks your capabilities are is more complicated and harder to evolve as a hardcoded reflex IMO.
Dogs weren't evolving in backyards with periodically opening see-through enclosures.
But yes, I'd assume most stealth predators with sophisticated brains (for example mammals) have some kind of theory of mind. It's just too useful not to have it. Same goes for animals living in complex social groups.