The Short Version
The claim matches a standard one-dimensional semialgebraic geometry result. Such functions can be partitioned into finitely many subintervals where they are real analytic, with any failures of analyticity confined to finitely many boundary points. Those exceptional points may include genuine discontinuities or cusps, so the statement is about piecewise analyticity, not global analytic extension.