I don't believe this is possible, because as you say, rules run on the server side, can run asyncronously, and have no return type, while Share runs client side - there seems to be no mechanism for reporting results between them .
Digital Community Manager, Alfresco Software. Problem solved? Click Accept as Solution!
The rule might be implemented in Java, so before the function's end it should send the message to the frontend, like: "Hey Share, let's display a popup now".
I was counting on Share webscripts but @angelborroy proved me wrong.
For now, I am just throwing an AlfrescoRuntime exception with my custom message. It works but it doesn't seem like an elegant solution. I'll update this post when I figure something out. Thanks for the help @EddieMay@angelborroy .
Anyway, sending a message from backend to frontend.. it feels to me like it should be a basic task