Let $M\subset \mathbb{R}^{n}$ be a hypersurface defined by a $C^{\infty}$ function $g(x_{1},\ldots,x_{n})$, $M:=\{(x_{1},\ldots, x_{n})\in \mathbb{R}^{n}:g(x_{1},\ldots,x_{n})=0\}$. If $M$ is smooth (i.e., the gradient of $g$ does not vanish in $M$), then the celebrated Jordan-Brouwer separation theorem states that $M$ divide $\mathbb{R}^{n}$ into two connected open sets, often called "indide" and "outside" parts of $M$.
Now, assume that $M$ is not a smooth hypersurface, but there is a point $x\in M$ such that in a neighbourhood of $x$, $M$ is smooth, that is, there is an open hypercube $C:=\prod_{i=1}^{n}(a_{i},b_{i})$ such that $M \cap C\neq \emptyset$ and the gradient of $g$ does not vanish in $C$. Can we derive from this that $M\cap C$ divide $C$ into an "indide" and "outside" part?
Many thanks for your comments.
I don't think you are going to get a satisfactory answer to the question as currently formulated: think about the case of an open square in the plane, and a nice, smoooth Jordan curve that enters and leaves and enters and leaves that square many times.
The problem with the current formulation is that it is not yet sufficiently "localized".
But there is a satisfactory and simple answer to a slightly reworded question, and it is one of the central theorems in the topic of differentiable manifolds, namely the Implicit Function Theorem. The key idea is that you have to localize further: while you might not get the desired conclusion in the given cube $C$, you will get that conclusion in some subcube.
From this theorem you can conclude that $M \cap D$ separates $D$ into two components, defined by two inequalities: $$x_{i_0} < f(x_1,...,\hat x_{i_0},...,x_n) $$ and $$x_{i_0} > f(x_1,...,\hat x_{i_0},...,x_n) $$