It says that mechanical strain is zero. The author considers mechanical strain and thermal strain separately. The mechanical one is zero if there is no external force. He never say that the thermal strain, due to thermal expansion, is zero.
According to the article:
Thermal strain is due to the change in temperature of the bar.
Mechanical strain is due to external forces acting on the bar.
Both strains measure the change in dimensions, here focus being on length of the bar.
If the temerature is fixed and you pull the ends of the bar, the bar expands and you have a mechanical strain.
If the temperature is changed but no forces act on the bar, the bar again expands and this is thermal strain. This is what free expansion means. The bar may be on a frictionless table and the ends are free from any obstacle. So there are no horizontal forces on the bar.
In general, you can hae both strains at the same time and they can cancel out in the right conditions. If you heat the bar but you aplly some compression at the ends, you may have no change in length. You can imagine this as having the two strains with opposite signs and cancelling each other. But the net effect is no change in length so no strain. But there is a stress in the bar. You can consider this situation in two steps, if you want. You heat the bar, it expands. Then you apply some compression force and you bring it back to the initial length.