I am doing a head-check here. I keep seeing this theorem quoted as requiring $A$ to be closed (as in Is the distance function in a metric space (uniformly) continuous?), but I don't think that it is needed.
Theorem. Let $(X,d)$ be a metric space and $\emptyset \neq A\subseteq X$. Then $x \longmapsto d(x,A)$ is Lipschitz continuous.
Proof. Fix $x,y \in X$. We note that for any $a \in A$ we have $d(x,a) \leq d(x,y) + d(y,a)$. Taking the infimum over $a \in A$ then gives $d(x,A) \leq d(x,y) + d(y,A)$. It follows quickly that $$ |d(x,A)-d(y,A)| \leq d(x,y) $$ and the claim is proved.
Have I accidentally used closedness of $A$ somewhere in my proof? I don't think it is necessary. Maybe the reason that it is usually quoted with $A$ closed is so that there is an $a \in A$ with $d(x,A) = d(x,a)$? (As @Martin points out, this also requires some compactness assumption on the unit ball, e.g. it holds if $X=\mathbb{R}^n$ with Euclidean metric)