https://stackoverflow.com/help/how-to-answer
How do I write a good answer?
...
Answer the question
Read the question carefully. What, specifically, is the question
asking for? Make sure your answer provides that – or a viable
alternative. The answer can be “don’t do that”, but it should also
include “try this instead”. Any answer that gets the asker going in
the right direction is helpful, but do try to mention any limitations,
assumptions or simplifications in your answer. Brevity is acceptable,
but fuller explanations are better.
Emphasis mine.
I suppose Any answer that gets the asker going in the right direction is helpful might provide some wiggle room but, in my opinion, if it doesn't answer the question then it's not an answer.
That said, it's not clear what you mean by "may not have answered the question per se". Are you thinking of times that someone suggested an alternative to what the Asker was trying to do (which is an answer), do you mean something more like someone suggesting debugging strategies, or do you mean something like the question is about a problem with a pointer and the answer is a tutorial on pointers (should be a comment)?