Which submanifolds are zero sets of $\mathbb{R}^n$-valued maps? If $M$ is a smooth, compact, orientable manifold, then any framed submanifold $N$ is the preimage $f^{-1}(y) $ for a smooth sphere-valued map $f$ transversal to $y$, with the framing of the normal bundle induced by $f$.
My question is: which framed submanifolds are induced by $\mathbb{R}^n$-valued maps? In other words, what is the condition on a framed submanifold $N$ of codimension $n$ to be the preimage $f^{-1}(0)$ for some $f: M\to\mathbb{R}^n$ transversal to $0$? "Framed-null-cobordand-ness" is probably necessary but not sufficient.

My motivation comes from this slightly more specific question that I'm trying to solve: if $M$ has a boundary and $g: \partial M\to S^n$ is given, then I want to find a common invariant of $f^{-1}(0)$ for all possible extensions $f: M\to D_n$ of $g$ ($D_n$ is the $n$-disc). At first, I though that a full invariant is a framed cobordism class in $M\setminus\partial M$ and that such cobordism classes are in 1-1 correspondence to homotopy classes $[\partial M, S^n]$. If I could prove that a framed cobordism $W$ between $N=f_1^{-1}(0)$ and $N'$ is the zero set of some $F: M\times [0,1]\to \mathbb{R}^n$ ($F$ nonzero on $\partial M)$, then I could use $F$ to define a homotopy between $F_0: (M,\partial M)\to (D_n, S^{n-1})$ and $F_1$ and then adjust it near the boundary so that $F$ is constant on $\partial M$. But I can't prove that $F$ exists.
I also tried to use a quotient $q: D_n/S^{n-1}\to S^n$, find a homotopy to $S^n$ and lift it: however, the homotopy lifting property works only for Serre fibration, which $q$ is not.. 
Any help will be much appreciated! (If necessary, I can also write more about the broader motivation behind these problems)
 A: edit: I've cleaned it up to make the dimension restrictions clearer, and to cover Peter's case of $M$ having boundary. 
Let $M$ have dimension $m$, be a manifold possibly with boundary.  $N \subset M$ a submanifold without boundary (in the interior of $M$) of dimension $n$.  The question is when we can realize a framed submanifold $N$ in $M$ as the zero-set of a smooth map $f : M \to \mathbb R^k$ transverse to $0$, $N = f^{-1}(0)$. 
$N$ being the pre-image of a regular value gives a canonical choice of trivialization of the normal bundle of $N$, the framing.  Let $\nu N$ be an open normal bundle for $N$.  Then the map $f$ on $M \setminus \nu N$ does not have $0$ in its image, so we can normalize it to a map $M \setminus \nu N \to S^{k-1}$.  
Up until this point we have an if and only if statement. Moreover, if we take a point $p \in S^{k-1}$ that is a regular value of this map and take its pre-image we get a framed manifold $W$ such that $\partial W = N$. 
Observation: a framed manifold $N \subset M$ is the pre-image of a regular value of a function to some $\mathbb R^k$ if and only if there is a framed manifold $W \subset M$ with $\partial W = N \cup N'$ where $N' \subset \partial M$. 
Unfortunately, it's possible that $W \cap \partial M \neq \emptyset$. For example, let $M = S^1 \times [0,1]$ and $N = S^1 \times \{1/2\}$, then $f : M \to \mathbb R$ is $f(z,t) = t-1/2$, and either $W = S^1 \times [0,1/2]$ or $W = S^1 \times [1/2,1]$ depending on how you chose $p$ above. 
This is something that's pretty inescapable, but I'm not sure if you were trying to avoid that. 
To answer your question in the bounty box, no, not every submanifold is the zero-set of a function transverse to $0$.  For example, take the real projective plane $\mathbb RP^2$ as $N$, and let $M$ be any sphere $S^m$, we need $m \geq 4$ for $N$ to be a submanifold of $M$.  If $\mathbb RP^2$ were the zero-set of a function, it would have an orientable normal bundle.  Since the sphere has an orientable normal bundle, that would give us an orientation of the tangent bundle to $\mathbb RP^2$.  But $\mathbb RP^2$ has a non-orientable tangent bundle.  
This kind of obstruction is fairly general.  Basically the only kinds of manifolds $N$ that can be realized would be ones that for some framing of its normal bundle, it (together with the framing) is the boundary of a framed manifold. 
A: If $N$ is framed and of codimension $n>0$ then a normal vector field gives you a manifold $N'$ isomorphic to $N$ (near $N$, running parallel to $N$). For $N$ to be of the form $f^{-1}(0)$ with $f:M\to \mathbb R^n$ transverse to $0$, it seems to be necessary and sufficient that $N$ is framed cobordant to $\emptyset$ in $M-N'$. If $n$ is less than one half the dimension of $M$ then this condition can be strictly stronger than "$N$ is framed cobordant to $\emptyset$ in $M$".
A: Take $D^3\times K$ for some manifold $K$ and attach a 4 handle to the boundary via a map homotopic to the Hopf map $S^3\to S^2\times pt \subset S^2\times K$.  You can't extend projection to $D^3\times K\to D^3$ to the handle without new zeroes (this is just a concrete example of Ryan Budney's reference to obstructions, here the obstruction comes from the fact that the Hopf map is not null homotopic.)  Note that there is no framed $W$ so $\partial W = 0\times K \cup$ something on the boundary.
