The ninjutsu ability can be activated when a creature attacks and isn't blocked.
From the glossary of the Comprehensive Rules (November 14, 2025—Edge of Eternities)
- Attacks and Isn’t Blocked
- An ability that triggers when a creature “attacks and isn’t blocked” triggers when the creature becomes an unblocked attacking creature. See rule 509.1h.