Yes, this is possible.
Assuming you are adding code to a custom Java action, import a relevant package.
and in the User Code section of executeAction, add your feedback as follows,
this.addTextMessageFeedback(MessageType.INFO, "Message to send", false);
Where the first argument is an enumeration (INFO, WARN, ERROR), the second argument is the message to send and the third argument determines whether or not this message is 'blocking' (that is, appears in a modal dialog).