Piecewise continuity of implicit function

Let $f:\mathbb{R}^2\to\mathbb{R}$ be a locally Lipschitz function, and $\mathcal{I}$ be a closed interval. Further, assume that there exists a single (unique) function $y_s:\mathcal{I}\to\mathbb{R}$ such that $$f(x,y_s(x))=0\;\;\forall x\in\mathcal{I}$$

Is it true that $y_s$ must be at least piecewise continuous?

Piecewise continuous means having a finite number of discontinuities. In general, $y_s$ is not continuous: consider $y_s(x)=1/x$ for $x\ne 0$ and $y_s(0)=0$; then $f$ can be the distance function to the graph of $y$/

No, $y_s$ does not have to be piecewise continuous. Key points:
1. Every closed set $A\subset\mathbb R^2$ is the zero set of a Lipschitz function, namely of $p\mapsto \operatorname{dist}(p,A)$
2. A function with a closed graph can have infinitely many discontinuities. For example, let $E=\{0\}\cup \{1/n:n\in\mathbb N\}$ and define $$y(x) = \begin{cases} 1/\operatorname{dist}(x,E),\quad &x\notin E \\ 0, & x\in E\end{cases}$$
• For an example with uncountable discontinuity set, let $E$ be the Cantor set.