First you have to know the proper definition of stress. By stress what immediately comes to our mind is $\frac{\textit {Force}}{\textit {Area}}$. But which force? Many mistakenly take it as the deforming force which is being applied on the body; just for example, you take it here as the force exerted by the surface on the body.
This is quite wrong. Actually, when a body is under the application of a deforming force, internal force of reaction comes into play within it, which tends to resist the applied force so as to maintain the original configuration of the body. This internal reaction force per unit area of the body is defined as stress.
However, according to Newton's third law of motion, the force of action is equal and opposite to the force of reaction. So, in case of mechanical stress, the stress is measured by considering the magnitude of the deforming force (obviously, that is easier than measuring the internal reaction force).
But, thermal stress is measured from the strain due to thermal expansion of the body which is not zero (why should it be because there is non-zero change in its length if you consider longitudinal strain). As evident from your equations, thermal stress $$\sigma=Y\times \textit {thermal strain}=Y\alpha\Delta T$$
So, as you can clearly see, stress is not zero.
This is as far as I made out of this although I do not understand why your book says that the strain should be zero.
You can also check out this answer : How would one derive the equation of thermal stress?