Detect all running macros

For the most part, no.

There is no way to get a list of running macros, and there is no way to specify or target a specific running instance.

Also, technically there is no such thing as a "running macro". When a macro is triggered, its actions are set to the execution engine and then executed. So a macro can be changed after it is triggered and the change will have no affect on the running instance. Also a macro can be triggered multiple times to result in multiple running instances (of potentially varying versions of the macro). So while a "running macro" is terminology that is used regularly, it is quite imprecise which is fine most of the time, but for these sorts of questions the distinction becomes important.

So you cannot "tell a running macro" anything really. There is no way to target or specify a specific running instance.

On the other hand, a running instance itself can cancel itself whenever it decides. So the macro could contain checks to see if a variable has been set to 1, or if an application is not running, or if a time limit has expired or whatever, and then cancel itself.

So your specific case, I would add something like:

If variable "I Should Die" is 1 or application "Whatever is not running" then Cancel This Macro.

If necessary you can name that action "Check Death" and copy it to various places around your macro.

Note that if you have Pause Until actions, then you may need to change them into While or Until actions so you can include your Check Death action, or you can add the conditions to the Pause Until action.