What do you mean by thought?
A much simpler question can be answered: is it possible to be cruel to an animal? The accepted answer revolves around whether or not you can influence the behavior of the animal (or machine). Crabs naturally hide under rocks. If you shock them when they hide under the rocks they eventually stop hiding under the rocks. Meanwhile a bacteria, by itself, will never learn to associate a stimulus with a condition.
That may capture the capability for thought. There are higher levels past it, like learning to model the behavior of other organisms, and those models eventually turning into a theory of self.