Let $f:M \to N$ be a differentiable map between two connected compact manifolds both of dimension $n\ge 2$ (I think i know the answer to my question if $n=1$). Let us assume that both $M$ and $N$ are connected and the image of $f$ is dense in $N$. So we know that preimage of a regular value is finite. Consider the regular points in $M$ and take the connected components of it. Let $A\subset M$ be such a component and suppose furthermore that that there are two different points $x,y\in A$ such that $f(x)=f(y)$. I have a complicated example ($n=2$) where this setup is possible. Let $U$ be a largest neighbourhood of $x$ in $A$ such that $f|U$ is injective (so if there is any $U'\supset U$ such that $f|U'$ is diffeomorphic to $f(U')$ then $U=U'$).
My questions is:
Is it true that the boundary of this largest neighbourhood $U'$ of $x$ will necessarily contain a point $x'$ in $A$ such that $f(x')$ is a critical value?
Is it true that the preimage of the critical value "separates" two points with the same image, i.e. if I consider $M$ without the preimage of the critical values then $f$ restricted to a connected component of this set is injective?
I would appreciate a counterexample or rough proof.
Edit1: Apparently I asked a question some years ago that is related to this question and the answer to that question would also answer my question here (both 1. and 2. are not necessarily true).
Edit2: Actually the example that was given to me two years ago was when $M$ is not compact and in my question I assumed $M$ is compact. I wonder if someone can give me an example when $M$ is the torus (so $n=2$).