Infimum is right with their counterexample, but let me offer non-trivial insight.
The boundary of an open ball $O \subseteq S$ is precisely $\overline{O} - O$. Why? From Wikipedia, the boundary of a set $S$ is..
...the set of points in the closure of S, not belonging to the interior of S.
Since $O$ is open, its interior points are exactly $O$, and so $\overline O - O$ is the boundary of $O$.
You have asked when it is the case that:
\begin{align}
\partial B(x;r) &= \{y \in M : d(x,y) = r\} \\
&= \{y \in M : d(x,y) \leq r\} - \{y \in M : d(x,y) < r\} \\
&= B_{closed}(x;r) - B(x;r) \\
\overline{B(x;r)} - B(x;r) &= B_{closed}(x;r) - B(x;r)
\end{align}
It is obvious that both $\overline{B(x;r)}$ and $B_{closed}(x;r)$ contain the entirity of $B(x;r)$, so we may reduce this to:
$$\boxed{\overline{B(x;r)} = B_{closed}(x;r)} \quad \Leftrightarrow \quad \partial B(x;r) = \{y \in M : d(x,y) = r\}$$
Knowing this, your question becomes equivalent to the following:
When is it the case that the closure of an open ball is equal to the
closed ball?
...which is answered here with the following equivalent condition:
For any two distinct points $x,y$ in the space and any positive $\epsilon$, there is a point $z$ within $\epsilon$ of $y$, and closer to $x$ than $y$ is.
That is, for every $x\neq y$ and $\epsilon\gt 0$, there is $z$ with $d(z,y)<\epsilon$ and $d(x,z)<d(x,y)$.