Your calculation is correct, but I'm hesitant to call it a "valid technique." Let me explain a bit:
In the context you're working in, we have a function $f(u)$, which is a function of a single variable, and also $u(x,y) = x - y$ is a function of two variables. In this setup, the chain rule reads as follows:
$$\frac{\partial f}{\partial x} = \frac{df}{du}\frac{\partial u}{\partial x}$$
$$\frac{\partial f}{\partial y} = \frac{df}{du}\frac{\partial u}{\partial y}$$
Since $\frac{\partial u}{\partial y} = -1$, we can conclude that $\frac{\partial f}{\partial y} = -1\cdot \frac{df}{du}$, and therefore that $$\frac{df}{du} = -1\cdot \frac{\partial f}{\partial y},$$
which, in your (somewhat non-standard) notation reads $\frac{\partial f(x-y)}{\partial (x-y)} = -1\cdot \frac{\partial f(x-y)}{\partial y}$. So, this equation is true, yes.
The reason I hesitate to call your method a "valid technique" is because one usually cannot manipulate the symbols $\partial x$ and $\partial y$ as independent entities.
For instance, if $f$ were instead a function of two variables, say $f(u,v)$, where both $u$ and $v$ were themselves functions of two variables (say $u = u(x,y)$ and $v = v(x,y)$), then the chain rule would read
$$\frac{\partial f}{\partial x} = \frac{\partial f}{\partial u}\frac{\partial u}{\partial x} + \frac{\partial f}{\partial v}\frac{\partial v}{\partial x}$$
$$\frac{\partial f}{\partial y} = \frac{\partial f}{\partial u}\frac{\partial u}{\partial y} + \frac{\partial f}{\partial v}\frac{\partial v}{\partial y}.$$
If you'll notice, we really can't interpret the $\partial u$ and $\partial v$ signs as canceling without getting false identities like $\frac{\partial f}{\partial x} = \frac{\partial f}{\partial x} + \frac{\partial f}{\partial x}$.
Amusing Example: Just to really drive the point home, consider the ideal gas law (from chemistry) $PV = nRT$, where $n$ and $R$ are constants. We can consider $P$, $V$, and $T$ as functions
$$P = P(V,T) = nR\frac{T}{V}$$
$$V = V(P,T) = nR \frac{T}{P}$$
$$T = T(P,V) = \frac{1}{nR}PV.$$
One can then check that, in fact:
$$\frac{\partial P}{\partial V} \frac{\partial V}{\partial T}\frac{\partial T}{\partial P} = -1.$$
So much for canceling.
Just for sake of completeness and other users who will ask something similar; Suppose we are given a differentiable function $f: \mathbb{R}^n \to \mathbb{R}$ and $h: \mathbb{R} \to \mathbb{R}^n$ s.t $g \in \textbf{dom}(f)$ and $h$ is also diff'ble. Then we can apply that chain rule,
$$ \frac{d}{dt} (f (h(t)) = \nabla f(h(t)) \cdot h'(t)$$
Here $h(t) = \textbf{x}t$ and so by the above,
\begin{align*} \frac{d}{dt} f(h(t)) &= \nabla f(h(t)) \cdot h'(t) \\ \\ & = \nabla f (\textbf{x}t) \cdot \textbf{x}\end{align*}
Best Answer
It's the difference between the partial derivative $\frac{\partial z}{\partial x}$ and the total derivative $\frac{\mathrm{d} z}{\mathrm{d} x}$. The total derivative accounts for potential dependency of $x$ and $y$ on each other. In our case, we would have $$\frac{\mathrm{d} z}{\mathrm{d} x} = \frac{\partial z}{\partial x} + \frac{\partial z}{\partial y} \frac{\mathrm{d} y}{\mathrm{d} x}.$$ Note that this is precisely the (single-variable) derivative of a two variable function $z$, with $x$ and a function $y(x)$ substituted in. Rearranging this gives us the differential of $z$ as before.
$$\mathrm{d} z = \frac{\partial z}{\partial x}\mathrm{d} x + \frac{\partial z}{\partial y} \mathrm{d} y.$$
Your mistake was treating $\mathrm{d} z$ and $\partial z$ as interchangeable, which they aren't.