The answer is yes, to both questions.

First question first. For any geodesic $n$-gon $P$ on $M$, i.e., a simply connected region of $M$ whose boundary consists of $n$-geodesic arcs, define

$$ \delta(P)= \mbox{sum of the angles of $T$}-(n-2)\pi. $$

Note that if $M$ were flat, then the defect $\delta(P)$ would be $0$. This quantity has a remarkable property: if $P= P'\cup P''$, where $P, P', P''$ are geodesic polygons, then

$$ \delta(P)=\delta(P')+\delta(P'')-\delta(P'\cap P'') $$

which shows that $\delta$ behaves like a finitely additive measure. It can be extended to a countably additive measure on $M$, and as such, it turns out to be absolutely continuous with respect to the the volume measure $dV_g$ defined by the Riemann metric $g$. $\newcommand{\bR}{\mathbb{R}}$ Thus we can find a function $\rho: M\to \bR$ such that

$$\delta= \rho dV_g. $$

More concretely for any $p\in M$ we have

$$\rho(p) =\lim_{P\searrow p} \frac{\delta(P)}{{\rm area}\;(P)}, $$

where the limit is taken over geodesic polygons $P$ that shrink down to the point $p$. In fact

$$ \rho(p) = K(p). $$

Now observe that if we have a geodesic triangulation$\newcommand{\eT}{\mathscr{T}}$ $\eT$ of $M$, the combinatorial Gauss-Bonnet formula reads

$$\sum_{T\in\eT} \delta(T)=2\pi \chi(M). $$

On the other hand

$$\delta(T) =\int_T \rho(p) dV_g(p), $$

and we deduce

$$ \int_M \rho(p) dV_g(g)=\sum_{T\in \eT}\int_T \rho(p) dV_g(p) =\sum_{T\in\eT} \delta(T)=2\pi \chi(M). $$

For more details see these notes for a talk I gave to first year grad students a while back.

As for the second question, perhaps the most general version of Gauss-Bonnet uses the concept of normal cycle introduced by Joseph Fu.

This is a rather tricky and technical subject, which has an intuitive description. Here is roughly the idea.

To each compact and *reasonably behaved* subset $S\subset \bR^n$ one can associate an $(n-1)$-dimensional current $\newcommand{\bN}{\boldsymbol{N}}$ $\bN^S$ that lives in $\Sigma T\bR^n =$ the unit sphere bundle of the tangent bundle of $\bR^n$. Think of $\bN^S$ as oriented $(n-1)$-dimensional submanifold of $\Sigma T\bR^n$. The term *reasonably behaved* is quite generous because it includes all of the examples that you can produce in finite time (Cantor-like sets are excluded). For example, any compact, semialgebraic set is reasonably behaved.

How does $\bN^S$ look? For example, if $S$ is a submanifold, then $\bN^S$ is the unit sphere bundle of the normal bundle of $S\hookrightarrow \bR^n$.

If $S$ is a compact domain of $\bR^n$ with $C^2$-boundary, then $\bN^S$, as a subset of $\bR^N\times S^{n-1}$ can be identified with the graph of the Gauss map of $\partial S$, i.e. the map

$$\bR^n\supset \partial S\ni p\mapsto \nu(p)\in S^{n-1}, $$

where $\nu(p)$ denotes the unit-outer-normal to $\partial S$ at $p$.

More generally, for any $ S$, consider the tube of radius $\newcommand{\ve}{{\varepsilon}}$ around $S$

$$S_\ve= \bigl\lbrace x\in\bR^n;\;\; {\rm dist}\;(x, S)\leq \ve\;\bigr\rbrace. $$

For $\ve $ sufficiently small, $S_\ve$ is a compact domain with $C^2$-boundary (here I'm winging it a bit) and we can define $\bN^{S_\ve}$ as before. $\bN^{S_\ve}$ converges in an appropriate way to $\bN^{S}$ as $\ve\to 0$ so that for $\ve$ small, $\bN^{S_\ve}$ is a good approximation for $\bN^S$. Intuitively, $\bN^S$ is the graph of a (possibly non existent) Gauss-map.

If $S$ is a convex polyhedron $\bN^S$ is easy to visualize. In general $\bN^S$ satisfies a remarkable additivity

$$\bN^{S_1\cup S_2}= \bN^{S_1}+\bN^{S_2}-\bN^{S_1\cap S_2}. $$

In particular this leads to quite detailed description for $\bN^S$ for a triangulated space $S$.

Where does the Gauss-Bonnet formula come in? As observed by J. Fu, there are some canonical, $O(n)$-invariant, degree $(n-1)$ differential forms on $\Sigma T\bR^n$, $\omega_0,\dotsc, \omega_{n-1}$ with lots of properties, one being that for *any* compact reasonable subset $S$

$$\chi(S)=\int_{\bN^S}\omega_0. $$

The last equality contains as special cases the two formulae you included in your question.

I am aware that the last explanations may feel opaque at a first go, so I suggests some easier, friendlier sources.

For the normal cycle of simplicial complexes try these notes. For an exposition of Bernig's elegant approach to normal cycles try these notes.

Even these "friendly" expositions with a minimal amount technicalities could be taxing since they assume familiarity with many concepts.

Last, but not least, you should have a look at these REU notes on these subject. While the normal cycle does not appear, its shadow is all over the place in these beautifully written notes.