A counter-example for integration by parts when there are "small" singularities
I am a bit confused by the question, please tell me if I misread anything.
Consider the domain $\Omega=B_1\subset\Bbb R^2$, i.e. the unit ball. Define $v$ to be $$ v(x)=\begin{cases}1 &; x<0 \\ 0 &; x\ge 0. \end{cases} $$ We can see that $v$ is smooth on $\overline\Omega\backslash l$, where $l=\{(x,y)\in\Bbb R^2 : x=0\}$ which is a closed set of measure zero.
Next, we take $\varphi\in C^\infty_c(\Omega)$. Since $\nabla v(x)=0$ a.e., we have $$ \int_\Omega \varphi \partial_i v = 0. $$ On the other hand, we have $$\begin{align} \int_\Omega(\partial_1\varphi)v = \int_{-1}^1 \varphi(0,y)\, dy \end{align}$$ since the distributional derivative of $v$ is the Hausdorff measure on $l$.
For a continuous counterexample, let's consider the case $\Bbb R^n=\Bbb R$ and $\Omega = (0,1)$. Let $v$ be the Cantor function
It has the property that $v'(x)=0$ a.e., thus for any function $\varphi\in C^\infty_c(0,1)$ we have $$ \int_0^1 \varphi v' = 0. $$ On the other hand, we have $$\begin{align} \int_0^1 \varphi'v = -c_0\int_{0}^1 \varphi(t)\, d\nu(t) \end{align}$$ where $\nu=\mathcal H^\gamma\lvert_C$, the Hausdorff measure of dimension $\gamma= \ln 2 /\ln 3$ restricted to the Cantor set $C$ (which is a compact set). Here $c_0$ is a normalizing constant that I don't remember.