A crow was very thirsty.He looked for water here and there.

Here "he" has been used for "crow" ,but as it was taught to me that we generally use "it" for animals and birds.

Would you please clear my doubt.

In a story "he" or "she" is fine for animals and birds.
In a scientific article, which is more formal writing, it is more likely that only "it" would be used.

Emotion: geeked
I'd like to add that even in conversation, it's also perfectly fine to use "he" or "she" when referring to animals.