Was I wrong to flag this question?
No, but you picked the wrong reason.
This question should be closed as off-topic, because it is asking for library/tool/external resource recommendations. The correct way is to flag -> should be closed.
Or in your case, you have enough reputation to cast a close vote directly. No need to flag at all.
Closing means that the question gets put "on hold", where the OP gets a chance to edit it and bring it back to a format that is fine for SO, before it gets deleted. Similarly, other users than the OP could sometimes edit a closed question to turn it acceptable.
Very low quality however, is for posts that are beyond rescue. Some examples:
- Something completely random not related to programming
- A question posted as answer
- Some brief one-liner asking for clarification by the op, which should be a comment and not answer.
- Random chat comments like "I'm having this problem too", "Did you solve this?" or "Thanks!".
- Link-only answers that provide nothing but a link to an external site.
Such posts will not get closed, but deleted directly (after consensus of 5 reviews from user moderators), without any chance for the OP to fix the post.
Would this might affect on my privileges to flag questions on SO?
Only if you repeatedly get a lot flags declined, or if your are somehow abusing the flagging system. A few flags declined here and there is nothing to worry about. Sometimes it is subjective if something should get closed/deleted, and then you may end up with declined flags even though you could be correct. Happens to everyone.