The property (P) indeed characterizes the Sobolev space $W^{1,p}$.
Theorem 1. $f\in W^{1,p}(\mathbb{R}^n)$, $1<p\leq\infty$ if and only if $f\in L^p$ and there is $0\leq g\in L^p$ such that $$ |f(x)-f(y)|\leq |x-y|(g(x)+g(y)) \ \ a.e. $$ Moreover the Sobolev norm is equivalent to $$ \Vert f\Vert_{M^{1,p}}=\Vert f\Vert_p+\inf_g \Vert g\Vert_p, $$ where the infimum is over all functions $g$ satisfying the above condition.
That was proved in the paper:
P. Hajlasz, Sobolev spaces on an arbitrary metric space, Potential Analysis , 5 (1996), 403-415.
Since the characterization does not use the notion of derivative the characterization was used to define Sobolev spaces on metric-measure spaces. By now this is a very well developed part of analysis with plenty of publications.
Regarding characterization (P') this is what I know:
Theorem 2. $f$ belongs to the homogeneous Hardy-Sobolev space $\dot{H}^{1,1}(\mathbb{R}^n)$, if and only if there is $0\leq g\in L^1$ such that $$ |f(x)-f(y)|\leq |x-y|(g(x)+g(y)) \ \ a.e. $$
This result was proved in:
P. Koskela, E. Saksman, Pointwise characterizations of Hardy-Sobolev functions.
Therefore functions satisfying (P') must belong to the Hardy-Sobolev space. Spaces with (P') contain certain Besov spaces. I will write more about it later since I need to check proper references and in the next days I will be very busy.
Moreover, the case $p=1$ is very close to a characterization of the space $W^{1,1}$.
Theorem 3. $f\in W^{1,1}(\mathbb{R}^n)$ if and only if $f\in L^1(\mathbb{R}^n)$ and there is $g\in L^1(\mathbb{R}^n)$ such that $$ |f(x)-f(y)|\leq |x-y|(M_{2|x-y|}g(x)+M_{2|x-y|}g(y)) $$ Where $M_Rg$ is the Hardy-Littewood maximal function with supremum of averages over balls of radii less than $R$.
The proof is much more difficult than that of Theorem 1. Theorem 3 as proved in
P. Hajlasz, A new characterization of the Sobolev space. (Dedicated to Professor Aleksander Pelczynski on the occasion of his 70th birthday.) Studia Math. 159 (2003), 263--275.