This question was not answered on math.stackexchange.

Let $M$ be a manifold (not necessarily compact) , for the sake of clearness embedded in $\mathbb{R^n}$ and $f\colon M\rightarrow \mathbb{R}$ a smooth function.

The theorem of Sard gives us that $$f+\langle\ \cdot\ ,a\rangle \colon M\rightarrow \mathbb{R}, \ x\mapsto f(x)+a_1x_1+...+a_nx_n$$ is a Morse function for almost all $a\in\mathbb{R}^n$.

Now suppose I have a finite set of regular values $c_1,...,c_n$ of $f$, so $f^{-1}(c_1),...,f^{-1}(c_n)$ do not contain critical points. Can I deform $f$ slightly to $\tilde f$, such that it becomes a Morse function, but the level sets of $c_1,..,c_n$ remain unchanged, i.e. $f^{-1}(c_i)=\tilde f^{-1}(c_i)$?

This is somehow a relative version of the density of Morse functions in the space of smooth functions.