$\newcommand\R{\mathbb R}\newcommand\om\omega\newcommand\Om\Omega\newcommand\tom{{\tilde\omega}}\newcommand\tOm{\tilde\Omega}\newcommand{\ep}{\varepsilon}\newcommand{\de}{\delta}\newcommand{\vpi}{\varphi}\newcommand\ol\overline\newcommand{\N}{\mathbb N}\newcommand{\Q}{\mathbb Q}$Take any $m\in\text{Im}(f)$ and then let
$$g(\om):=
\begin{cases}
f(\om)&\text{ if }\om\in\tOm, \\
m&\text{ if }\om\in\Om\setminus\tOm.
\end{cases}$$
The $g$ will have the desired properties.
The OP has changed the question, thus invalidating the answer above.
The answer to the changed question is still yes, but the construction is much more complicated.
Since the manifold $M$ is compact, it has a finite atlas $A:=\{(U_i,\vpi_i)\colon i\in[k]\}$, where $[k]:=\{i\in\N\colon i\le k\}$, with bounded images $\vpi_i(U_i)$ of the $U_i$'s. Without loss of generality (wlog), $A$ is a refinement of another atlas $\{(V_i,\psi_i)\colon i\in[k]\}$ of $M$ in the sense that $\ol{U_i}\subseteq V_i$ and $\vpi_i=\psi_i|_{U_i}$ for all $i$, where $\ol S$ denotes the closure of a set $S$ and $|_S$ denotes the restriction to $S$.
For each $i\in[k]$, let
\begin{equation}
\hat\Om_i:=f^{-1}(U_i), \quad
\Om_i:=\ol{\hat\Om_i}\setminus\bigcup_{j\in[k-1]}\ol{\hat\Om_j}, \quad
\tOm_i:=\hat\Om_i\cap\Om_i.
\end{equation}
Then
\begin{equation}
\Om=\bigcup_{i\in[k]}\Om_i
\end{equation}
(because $M=\bigcup_{i\in[k]}U_i$, whence $\tOm=\bigcup_{i\in[k]}\hat\Om_i$, whence $\Om=\ol\tOm=\ol{\bigcup_{i\in[k]}\hat\Om_i}=\bigcup_{i\in[k]}\ol{\hat\Om_i}=\bigcup_{i\in[k]}\Om_i$);
the $\Om_i$'s are pairwise disjoint and measurable;
$\tOm_i$ is countable and dense in $\Om_i$ for each $i$ (because the $\ol{\hat\Om_i}$'s are closed sets);
$f(\tOm_i)\subseteq U_i$ for each $i$.
So, it suffices to construct the function $g$ locally -- that is, separately on each $\Om_i$. So, to simplify notations in what follows, fix any $i\in[k]$ and let
$U:=U_i$, $\vpi:=\vpi_i$, and $\psi:=\psi_i$.
Also, re-define $\Om$ and $\tOm$ by letting them, respectively, denote $\Om_i$ and $\tOm_i$, from now on.
In other words, we are going to omit the subscript ${}_i$ everywhere in what follows.
Let $n$ denote the dimension of the manifold $M$, so that
\begin{equation}
\vpi(m)=(\vpi^1(m),\dots,\vpi^n(m))\in\R^n
\end{equation}
for some real-valued functions $\vpi^1,\dots,\vpi^n$ and all $m\in U$.
For $j\in[n]$, let
\begin{equation}
h_j:=\vpi^j\circ f,\quad\text{so that }h_j\colon\tOm\to\R.
\end{equation}
Take any real $\ep>0$. For each $\om\in\Om$, let
\begin{equation}
H_\ep(\om):=\vpi(f(\tOm\cap B_\om(\ep)))
=\{h(\tom)\colon\tom\in\tOm\cap B_\om(\ep)\},
\end{equation}
where
\begin{equation}
h(\tom):=\vpi(f(\tom))=(h_1(\tom),\dots,h_n(\tom))
\end{equation}
and
\begin{equation}
B_\om(\ep):=\{\tau\in\Om\colon d(\tau,\om)<\ep\}.
\end{equation}
Since the map $\vpi$ is continuous and $f(\tOm\cap B_\om(\ep))\subseteq\ol U\subseteq M$, the set $\ol{H_\ep(\om)}$ is a compact subset of $\R^n$. So, there is a unique maximum, say
\begin{equation}
\ol h_\ep(\om)=(\ol h_{1,\ep}(\om),\dots,\ol h_{n,\ep}(\om))\in\R^n,
\end{equation}
of the set $\ol{H_\ep(\om)}$ with respect to the (total/linear) lexicographic order.
Note that for any real $c_1$
\begin{equation}
\begin{aligned}
&\ol h_{1,\ep}(\om)\le c_1 \\
&\iff \\
&\forall\tom\in\tOm\quad \tom\in B_\om(\ep)\implies h_1(\tom)\le c_1,
\end{aligned}
\end{equation}
which can be rewritten as
\begin{equation}
\begin{aligned}
&\ol h_{1,\ep}(\om)\le c_1 \\
&\iff \\
&\forall\tom\in\tOm\quad \om\in B_\tom(\ep)\implies h_1(\tom)\le c_1,
\end{aligned}
\end{equation}
Letting $\Q_{++}:=\Q\cap(0,\infty)$,
by induction on $n$ one can show that for $n\ge2$ and any real $c_1,\dots,c_n$
\begin{align*}
&\ol h_{1,\ep}(\om)\le c_1\ \&\ \cdots\ \&\ \ol h_{n,\ep}(\om)\le c_n \\
&\iff \\
& \begin{aligned}
& \ol h_{1,\ep}(\om)\le c_1\ \&\ \cdots\ \&\ \ol h_{n-1,\ep}(\om)\le c_{n-1} \\
&\&\ \forall\de_n\in\Q_{++}\ \exists \de_1,\dots,\de_{n-1}\in\Q_{++}\
\forall\tom\in\tOm\quad \\
&\quad\ \om\in B_\tom(\ep) \\
&\quad\ \implies
(h_1(\tom)\ge c_1-\de_1\ \&\ \cdots\ \&\ h_{n-1}(\tom)\ge c_{n-1}-\de_{n-1} \\
&\qquad\qquad \implies
h_n(\tom)\le c_n+\de_n).
\end{aligned}
\end{align*}
Therefore and because the balls $B_\tom(\ep)$ are measurable whereas the sets $\Q_{++}$ and $\tOm$ are countable, we conclude that the $\R^n$-valued function $\ol h_\ep$ is measurable.
Moreover, since the set $H_\ep(\om)$ is nondecreasing in $\ep$, so is the maximum $\ol h_\ep(\om)$ of the set $\ol{H_\ep(\om)}$. So, there is a pointwise limit $\ol h$ of $\ol h_\ep$: for each $\om\in\Om$,
\begin{equation}
\ol h(\om):=\lim_{\ep\downarrow0}\ol h_\ep(\om)
\end{equation}
and, hence, by the continuity of the map $\psi^{-1}$,
\begin{equation}
g(\om):=\psi^{-1}(\ol h(\om))=\lim_{\ep\downarrow0}\psi^{-1}(\ol h_\ep(\om)).
\end{equation}
The function $\ol h$ is measurable, as the pointwise limit of the measurable functions $\ol h_\ep$. Also, the continuous map $\psi^{-1}$ is measurable. So, $g=\psi^{-1}\circ \ol h$ is measurable.
The maximum $\ol h_\ep(\om)$ of the set $\ol{H_\ep(\om)}$ is of course in $\ol{H_\ep(\om)}$ and hence $\ol h_\ep(\om)=\lim_{r\to\infty}h(\tom_{\ep,\om,r})$ -- for each real $\ep>0$, each $\om\in\Om$, and some sequence $(\tom_{\ep,\om,r})_{r\in\N}$ in $\tOm\cap B_\om(\ep)$.
Since $\psi^{-1}$ is continuous and $\psi^{-1}(h(\tom))=f(\tom)$ for all $\tom\in\tOm$, we have
\begin{equation}
g(\om)=\lim_{\ep\downarrow0}\psi^{-1}(\lim_{r\to\infty}h(\tom_{\ep,\om,r}))
=\lim_{\ep\downarrow0}\lim_{r\to\infty}\psi^{-1}(h(\tom_{\ep,\om,r}))
=\lim_{\ep\downarrow0}\lim_{r\to\infty}f(\tom_{\ep,\om,r}).
\end{equation}
So, for each $\om\in\Om$ there is a sequence $(r_t(\om))_{t\in\N}$ in $\N$ such that
\begin{equation}
g(\om)
=\lim_{t\to\infty}f(\tom_{1/t,\om,r_t(\om)}).
\end{equation}
Moreover, $\tom_{1/t,\om,r_t(\om)}\in B_\om(1/t)$ and hence $\tom_{1/t,\om,r_t(\om)}\to\om$ as $t\to\infty$. $\quad\Box$
Remark: Some of the conditions here can be relaxed. In particular, we do not need $M$ to be a Riemannian manifold or any manifold at all. In particular, it suffices that $M$ be any topological space admitting a finite open cover $\{U_i\colon i\in[k]\}$ with homeomorphisms $\psi_i$ of $\ol{U_i}$ onto compact domains $D_i\subset\R^{n_i}$, for each $i\in[k]$.
Counterexample. For each $n$ let $k_n$ be the characteristic function of $[0,\frac{1}{2^n}] \cup [\frac{2}{2^n},\frac{3}{2^n}] \cup \cdots$. Next observe that there are only countably many subsets of $[0,1]$ of the form: a finite union of open intervals with rational endpoints, whose total length is $\frac{1}{10}$. Enumerate these sets as $(A_n)$, and for each $n$ let $f_n$ be the function which is constantly $1$ on $A_n$ and equals $k_n$ on $[0,1]\setminus A_n$.
For any subset $E$ of $[0,1]$ whose measure is at most $\frac{1}{10}$, we can find a subsequence $(A_{n_k})$ of $(A_n)$ such that $m(E\setminus A_{n_k}) \to 0$. Then $(f_{n_k}) \to 1$ pointwise a.e. on $E$.
Now suppose that some subsequence $(f_{n_j})$ converges pointwise a.e. on $[0,1]$ to some function $F$. By Egoroff, we can assume that $(f_{n_j}) \to F$ uniformly on $A$, for some measurable $A \subseteq [0,1]$ with $m(A) > \frac{9}{10}$. But this is impossible, because for any $n_0$ the set $B$ on which $f_{n_0}$ is constantly zero has measure at least $\frac{4}{10}$ (namely, $\frac{1}{2}$ on which $k_{n_0}$ is zero, minus at most $\frac{1}{10}$ on $A_{n_0}$), hence has positive measure intersection with $A$, and no subsequence of $(f_n)$ converges to zero on a set of positive measure (thus showing that for sufficiently large $n$, $f_n$ is not constantly zero, and hence has uniform distance $1$ to $f_{n_0}$, on this intersection).
Best Answer
The answer is no and the following result provides a quite interesting counterexample. This is a known result, but I am not sure where to find it in the literature.
Indeed, if $D=\operatorname{span}\{\varphi_k\}$, then $$ \int_{\mathbb{R}^n} f\varphi = \int_{\mathbb{R}^n} 0\cdot\varphi, \quad \forall \varphi\in D. $$
Proof. Let $\mathbb{K}=\mathbb{R}$ or $\mathbb{C}$ be the given field. In the proof we will need the following result.
Proof. Since $L$ is discontinuous, it is unbounded, so there is a sequence $y_n\in X$ such that $|Ly_n|>n\Vert y_n\Vert$. Thus $x_n=y_n/\Vert y_n\Vert$ satisfies $$ \Vert x_n\Vert =1 \quad \text{and} \quad |Lx_n|>n. \tag2 $$ Let $y\in X$ be arbitrary. Then (2) yields $$ \ker L\ni y-\Big(\frac{Ly}{Lx_n}\Big)x_n\to y $$ so $\ker L$ is dense in $X$. $\Box$
Proof of the theorem. $X:=C_c^\infty(\mathbb{R}^n)\subset L^2(\mathbb{R}^n)$ is a dense linear subspace. Note that $$ L:X\to\mathbb{K}, \qquad L\varphi=\int_{\mathbb{R}^n}f(x)\varphi(x)\, dx $$ is a linear functional on $X$. We will show that $L$ is unbounded (with respect to the $L^2$ norm in $X$). Suppose to the contrary that $L$ is bounded. Then it extends uniquely to a bounded linear functional $\tilde{L}:L^2(\mathbb{R}^n)\to\mathbb{K}$. Therefore, the Riesz Representation yields existence of $g\in L^2(\mathbb{R}^n)$, such that $$ \tilde{L}\varphi=\int_{\mathbb{R}^n}\varphi(x)\overline{g(x)}\, dx \quad \varphi\in L^2(\mathbb{R}^n). $$ In particular $$ \int_{\mathbb{R}^n}(f(x)-\overline{g(x)})\varphi(x)\, dx=0 \quad \text{for all $\varphi\in C_c^{\infty}(\mathbb{R}^n)$.} $$ Therefore $f-\overline{g}=0$ a.e., $f=\overline{g}\in L^2(\mathbb{R}^n)$ which contradicts the assumption about $f$.
We proved that $L$ is discontinuous, hence by the lemma, $\ker L\subset X=C_c^\infty(\mathbb{R}^n)$ is dense and hence it is dense in $L^2(\mathbb{R}^n)$. Now applying the Gramm-Schmidt orthogonalization to a countable and dense subset of $\ker L$ we obtain an orthonormal basis $\{\varphi_k\}_{k=1}^\infty\subset\ker L$ of $L^2(\mathbb{R}^n)$ consisting of compactly supported smooth functions. Since $L\varphi_k=0$ for all $k$, (1) follows. $\Box$