The wind was thrashing (in) the trees.
Should we have 'in' in the sentence?
I googled it and it seems both were used.
Both are correct? Thank you!
Thrash can be a transitive or an intransitive verb. If it's transitive, it means "to beat severely." If it's intransitive, it means "to move about violently."
If my parents had found out I was smoking cigarettes, they would've thrashed me!
The high fever had Susan delirious and thrashing in bed.
So both sentences are correct, but mean something slightly different.
The wind thrashed the trees.
is a metaphor: we imagine the strong wind blowing against the trees as being a merciless beating.
On the other hand,
The wind thrashed in the trees.
is more literal: we imagine the wind violently wandering about the trees. In practice it is more or less the same image, but there is a little difference.
Three more comments about the word thrash, not directly related to your question:
It's not so common in everyday speech, and has an educated feel to it. I specifically remember learning it in school.
Googling for examples, it appears the phrasal verb "thrash out" (to work through the detalis of something carefully, as if by beating them senseless) is the most common use of the word.
Googling for examples, it also appears that there is a genre of music entitled "thrash metal."