In addition to two good answers, maybe one case the question has a positive answer is when $(R,m)$ is a regular local ring and $f$ is a nonzero element. For a Noetherian local ring $A$ and ideal $I$ which is primary to the maximal ideal, let $e(I, A)$ denote the Hilbert-Samuel multiplicity of $A$ with respect $I$. Then $e(m/(f),R/(f)) = \hbox{ord} (f) e(m, R) = \hbox{ord} (f)$ where $\hbox{ord} (f) = \sup \{ i \\, | \\, f \in m^i \}$$\hbox{ord} (f) = \sup \{ i \mid f \in m^i \}$. Here $e(m, R) = 1$ since $R$ is a regular local ring.
The special case is when the dimension of a ring (not necessarily regular) $R$ is $1$ and $f$ is a non zero-divisor (but not a unit) of $R$. Assume that $R$ is Cohen-Macaulay (domain or reduced implies Cohen-Macaulyness in dim $1$). Then we have that length $(R/(f)) = e((f), R) \ge \hbox{ord} (f) e(m,R)$ where the last inequality follows from Theorem 14.10 in Matsumura's commutative ring theory. A positive answer to your question implies an equality in the formula and $e(m,R) = 1$. The latter condition is equivalent to $R$ being regular if $R$ is unmixed. Note that the associated graded ring is a polynomial ring over the residue field if a ring is regular. In particular, it is a domain. I believe that once $R$ is a regular local ring, then the equality follows.
I believe in Hartshorne's algebraic geometry book, a surface is a nonsingular (locally regular) projective surface over an algebraically closed field. This probably is a reason why it works well. I hope someone can add some geometric point of view.