My thermodynamics textbook (Blundell & Blundell, second edn.) states in equation (16.65) that $$\frac{C_V}{T}=\left(\frac{\partial S}{\partial T}\right)_V \quad and \quad \frac{C_p}{T}=\left(\frac{\partial S}{\partial T}\right)_p. \tag{1}\label{1}$$ but does not specify the condition under which they can be used.
I try to derive these equations as follows. If one starts with the definition of heat capacity at constant volume $$C_V = \left(\frac{\partial Q}{\partial T}\right)_V\ ,$$ or $$dQ=C_V dT \quad \mathrm{at\ constant\ volume}. \tag{2}\label{2}$$ The definition of entropy reads $$dQ_{rev} = T\ dS, \tag{3}\label{3}$$ where $dQ_{rev}$ is the reversible change of heat.
Combining \eqref{2} and \eqref{3} one obtains the first of \eqref{1}, provided only that $dQ=dQ_{rev}$. Similar argument holds for the second one in \eqref{1}. Does this mean \eqref{1} is only true for reversible processes, or am I missing something?