Yes, you should be able to do this. One suggestion is by first searching for the Proc symbol (see SetDataSeach and GetNextSym instructions) to find the Proc name, and then use “late binding” to execute the proceedure (put the Proc Name into a string and then call the string as a proc with %stringname%)
You could also skip the symbol searching and simply call the procedure using late binding, if the procedure exists, it will be called, otherwise an error will occur and you can handle the error automatically in the error handler of the procedure.