You have worked with company X.
You have maybe* worked for company X.
But you have not been employed by company X.
If it's a simple yes/no answerquestion then the answer is no. If they give you space for a more lengthy response, then mention the collaboration.
* Depending on how different people interpret the word 'for' as it relates to your consulting relationship.