Another simple approach is to take the lacunary series $f(x)=\sum_k a_k e^{i(m_k,x)}$ where $m_k\in \mathbb Z^d$ and $|m_{k+1}\gg |m_k|$. For any modulus of continuity $\omega$ such that $\Omega(t)=\omega(t)/t\to \infty$ as $t\to 0$, the condition that $f$ has this modulus of continuity is equivalent to the condition that $|a_k|\le C\omega(|m_k|^{-1})$ if the spectrum is sparce enough to ensure that $\Omega(|m_{k+1}|^{-1})\ge 2\Omega(|m_k|^{-1})$ and $\omega(|m_k|^{-1})\ge\sum_{\ell>k}\omega(|m_\ell|^{-1})$. If $f\in W^{1.p}$, then $ \left|\int f\nabla\psi\right|\le C\|\psi\|_{L^q}$ for smooth $\psi$. Plugging $e^{-i(m_k,x)}$, we see that unless $a_k=O(|m_k|^{-1})$, we have no chance. Thus, nothing short of Lipschitzness will force $f$ to be in $f\in W^{1.p}$.
This formally works only on the torus but you can take any smooth partition of unity $g_j$ on the torus and notice that one of the functions $g_j f$ is also bad. But any of them can be replanted to $\mathbb R^d$ if the supports are small enough.