The most important data - grade of the stainless steel is missing from the given problem. Note that the thermal expansion coefficient of the stainless steel varies with its grades (304, 310, 316 ...) that can change the result.
In general sense, let's see what happens when heating (assume veriation of E due to heating is small and negligible):
$\Delta L = L \alpha \Delta T = \dfrac{\sigma_t L}{E}$, therefore, $\sigma_t = \alpha \Delta T E$
Now you can compare $\sigma_t$ to $\sigma_y$ to determine whether the rod has reached yield or not. If stressed beyond yield, yes, the rod will yield plastically as hinges will form at the supports; otherwise, the rod will absorb the energy, and nothing will happen.
We can write the equation for condition indicates non-yielding,
$\sigma_t < \sigma_y$, or $\dfrac{\sigma_t}{\sigma_y} < 1.0$, thus the expression $\dfrac {\alpha \Delta T E}{f_y} < 1.0$
Now let's see what happens when cooling at this stage:
If the rod has not been stressed beyond yield through heating, the rod will remain elastic and return to its original state (starting length and stress).
Otherwise, the rod would not return to its original state, as the deformation at the hinged supports can't be recovered.
Example: Assume A304 stainless steel rod heated from $25^oC$ to $300^oC$, will it yield?
For A304, $f_y = 205 MPa$, $E = 193 GPa$, $\alpha = 1.78x10^{-6}$ $m/m^oC$
$\dfrac {\alpha \Delta T E}{f_y} = \dfrac{1.78x10^{-6}*(300-25)*193x10^9}{205x10^6} = 0.46 < 1.0$ ---> The rod will not yield. And we can say, that if cooled gradually, the rod will return to its original state.