A "local" version of the Jordan-Brouwer separation theorem 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. 
 A: 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.

The Implicit Function Theorem: Under the conditions stated (in particular for any cube $C$ as stated), there exists a subcube 
  $$D = \prod_{i=1}^n (c_i,d_i), \quad a_i \le c_i < d_i \le b_i \,\text{for each $i$}
$$
  and there exists an index $i_0 \in \{1,\ldots,n\}$, such that $x \in D$, and such that $M \cap D$ is the graph of a smooth function
  $$x_{i_0} = f(x_1,...,\hat x_{i_0},...,x_n)
$$
  where the notation $\hat x_{i_0}$ means "remove $x_{i_0}$ from the argument list".

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)
$$
