A definition of whether X has a property P must refer to the characteristics of X in some way. In order to decide whether X has the property P one must define what X is.
Once you have chosen your entity and defined the boundary between it and the external world we can start. Suppose we choose me and define me to consist of the state of my brain and the hormones raging around my blood stream (everything else is the rest of the universe).
Now consider reasonable perturbations of me. These would include changing the state of activation of my neurons, changes to my neuronal pathways and the balance of hormones in my blood. They wouldn't include encoding significant useful information into subsystems of my neurons or introducing psychedelic drugs into my blood stream.
An entity has free will to do X after time T if there exists some reasonable perturbation of the entity at time T such that it subsequently does X and there exists another reasonable perturbation such that it doesn't do X.
We also require that the effect of the perturbation ought not to be destroyed by most minuscule changes to the entity. This ensures that the perturbation doesn't achieve its change just through the mechanisms of chaos theory.
So if I am sitting in a chair at time T about to be electrocuted I do not have free will to decide to live as there is no reasonable perturbation of me that would result in me living. By the same reasoning I don't have free will to die.
If I am sitting in a chair at time T and you come up to me and threaten to kill me unless I divulge the whereabouts of my friend to you (so you can murder her) I do have free will as to whether to live (assuming I do know the answer) as there is a reasonable perturbation of me (add lots of adrenaline, stress inducing hormones and set my neurons to the state of someone who doesn't care about the friend) that will result in me surviving. Note that if I don't know where she lives then it is an unreasonable perturbation to add that knowledge to my brain.
Its easy to come up with degrees of free will using this definition just by allowing varying degrees of reasonable perturbation. For instance you might decide that the degree to which I care about my friends and my emotional state shouldn't be things that you can reasonably perturb. In that case I might come out as having no free will in whether or not to die (if I were almost unrealistically selfless that is).
If we consider a rock. The rock's internal state consists of patterns of heat. Reasonable perturbations consist of changing the pattern by a few degrees here and there.
The rock has free will in practically nothing as the pattern of heat is very rarely going to make any predictable difference to the way the rock behaves. In particular in falling down a mountainside a rock does not have free will whether or not to hit someone at the bottom because although a slight change to its heating pattern can drastically change its path (because of chaos theory) a tiny further change to the rock would cause it to take an entirely different path.
It is also possible to ask to what extent people have long term free will. Can a reasonable perturbation of a persons internal state effect their decisions accurately days, months or even years hence? In general the answer is yes. However for a rock or many inanimate object the answer is going to be a resounding no.
Applied to animals we get reasonable degrees of free will out. The animal in general has free will to perform actions it know how to perform. Probably though you're going to get little long term free will. Plants will have a very limited free will in most cases. Rocks, streams etc will have essentially no free will. People will have a lot of free will. A computer program operating on some data will in general have some free will but of course it all depends how you define the reasonable perturbations of the software program.