You can have stalking behaviour based on simple ingrained unconscious if-then rules (don't be seen basically).
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.