Let $B\subset \mathbb{R}^2$ be the unit "open" ball with centre in origin. Define a function $u:\overline{B}\to \mathbb{R}$ in the folllowing way: let $(x,y)=(r\cos\theta,r\sin\theta)$ with $r\in [0,1]$ and $\theta\in [0,2\pi]$.
For $r\in [0,1]$ and $\theta\in [\pi,2\pi]$, $u(r,\theta)=0$.
Now consider the segment $\ell=\{te_2+(1-t)e_1, \ t\in [0,1]\}$. For each $\theta\in [0,\pi/2]$, let $r_\theta\in [0,1]$ be the number for which $r_\theta\theta\in \ell$.
For $\theta\in [0,\pi/2]$, define $u(r,\theta)=2r\theta/\pi $, if $r\in [0,r_\theta]$.
For $\theta\in [0,\pi/2]$, define $u(r,\theta)=2r_\theta\theta/\pi-2r_\theta\theta/((1-r_\theta)\pi)(r-r_\theta)$, if $r\in [r_\theta,1]$.
We define $u(r,\theta)$ for $\theta\in [\pi/2,\pi]$ and $r\in [0,1]$ in an analogous way, by considering the segment $\ell'=\{te_2-(1-t)e_1,\ \forall\ t\in [0,1]\}$.
My question is: does $u\in W_0^{1,p}(\Omega)$ for some $p\in [1,\infty)$. If not, does anyone know of a function $u$ satisfying $$u\in (W_0^{1,p}(B)\cap C(B))\setminus C(\overline{B})$$
Remark: Note that my function $u$ satisfies $u\in C(B)\setminus C(\overline{B})$.
Remark 1: The graph of $u$ is piecewise linear.
Near $e_2$, you have the function approaching $1$ along the segment $\ell$; yet it's zero on the boundary of the disk. This will make $|\nabla u|$ blow up like $|x-e_2|^{-1}$ in between, guaranteeing $u\notin W^{1,p}$ for $p\ge 2$. I think $u\in W^{1,p}$ for $1\le p<2$. A more transparent description of (some version of) your function could be:
Let $\Omega$ be an open disk, and let $Q$ be a square inscribed in $\Omega$. Define $$ u(x) = \frac{\operatorname{dist}(x,\Omega^c)}{\operatorname{dist}(x,\Omega^c)+\operatorname{dist}(x,Q)},\quad x\in \Omega \tag{1} $$ Note that $u\equiv 1$ on $Q$, and there are discontinuities at the points where the square touched the boundary of the disk. Since the distance function is $1$-Lipschitz, one can see from (1) that $u$ is locally Lipschitz in $\Omega$ and $$|\nabla u|\lesssim (\operatorname{dist}(x,\Omega^c)+\operatorname{dist}(x,Q))^{-1}$$ The measure of the set where $\operatorname{dist}(x,\Omega^c)+\operatorname{dist}(x,Q)<\epsilon$ is $O(\epsilon^{-2})$, which means $|\nabla u|\in L^{2,\infty}$, hence $|\nabla u|\in L^p$ for $1\le p<2$.
The function is in $W^{1,p}_0$ because its zero extension to $\mathbb R^2$ has the ACL property and the derivatives are integrable, as stated above. I omit the details because the goal is easier to achieve with a different construction which I describe below.
Let $$ u(x) = \sum_{n=1}^\infty \left(1-M_n|x-x_n| \right)^+ $$ where $x_n\to e_1$ and $M_n\to \infty$. Every partial sum is a Lipschitz function with compact support on $\Omega$. The $n$th term of the series has $W^{1,p}$ norm $O(M_n^{1-2/p})$; hence, the series can be made convergent in $W^{1,p}$ for every $p<2$. And since $u(x_n) = 1$ for all $n$, the sum is not continuous at $e_1$.