The Help Center says that asking to recommend an app/service/ROM is considered as off-topic, but is it acceptable to recommend an app in an answer, for a question which does not explicitly ask for an app to solve a problem? Is it advised to first ask from the OP (in comments) if it is okay to recommend an app?
Yes, if an app is the answer to a question, it's perfectly OK to post that answer.
There are really two reasons why app recommendation questions are off-topic.
The answer might not be an app
If you're trying to make your phone do something in particular, it might not be possible to do it with an app. Maybe the answer is a custom ROM. Maybe you need to combine several apps e.g. use Tasker to make K9 Mail check for email when a certain event happens. Either way, you can only get a good answer if you tell everyone what the problem is you're trying to solve. "Is there an X app with a Y feature?" doesn't give people enough information to solve the problem, so we encourage posters to describe the problem instead of asking for an app.
Note that almost all "is there an app?" questions can be asked in this way, so there's no reason to post questions that will be closed. If the poster did describe the problem fully, there's no need to close the question even if they explicitly said "is there an app?"
They can be opinion-based
There's another kind of app recommendation question: "what is the best X app?" These questions are clearly opinion-based. They'd be closed even if we didn't have a rule specific to app recommendations.
Neither of these reasons is a reason not to post an answer recommending an app. Just remember how not to be a spammer: if you're associated with the app, you must say so in your answer. Whether you wrote it, or your brother-in-law works for the developer, or you got paid to make a YouTube video about it, just say so. This allows everyone to judge recommendations fairly, and preserves the independence and value of the site's content.