Let $M$ be a Riemannian manifold.
• If $M$ is orientable then we are familiar with the definition of $\int_{M}f$; where $f$ is a smooth function with a compact support, e.g. J.Lee's book.
• However, we are able to define a measure (Riemannian measure) on any Riemannian manifold that is not necessarily orientable, e.g. Grigoryan, book: Heat kernel and analysis on manifolds. Therefore we can define $\int_{M}f$ on any Riemannian manifold $M$ as long as $f$ is Borel measurable (usual measure theory).
My question is: which definition do we frequently prefer to use? Thanks!
$\newcommand{\Reals}{\mathbf{R}}\newcommand{\Basis}{\mathbf{e}}$Briefly, the second definition encompasses the first.
If $(M, g)$ is an arbitrary Riemannian $n$-manifold (orientable or not), then in a coordinate neighborhood, there exist precisely two $n$-forms (which we might denote $\pm\mu$) such that $\mu(\Basis_{1}, \dots, \Basis_{n}) = \pm 1$ for every orthonormal frame $(\Basis_{j})_{j=1}^{n}$. Consequently, there is a unique volume density $|\mu|$, satisfying $|\mu|(\Basis_{1}, \dots, \Basis_{n}) = 1$ for every orthonormal frame.
(If you like, there is a trivial real line bundle over $M$ whose transition maps are the absolute values of the Jacobians of ordinary coordinate changes. By definition, a volume density is a section of this bundle.)
Either a volume form or a volume density suffices to integrate measurable functions on $M$, locally in the same way that the Euclidean measure $|dx_{1}\, dx_{2} \cdots dx_{n}|$/ordinary $n$-dimensional Lebesgue measure suffices, and globally using partitions of unity.
If $M$ is connected and orientable, then fixing a choice of orientation (say, picking $\mu$) at one point imposes a unique compatible orientation globally, yielding a smooth $n$-form $\mu$. The value of $\mu$ on a positively-oriented frame coincides with the value of the corresponding volume density, and for the purpose of integrating functions, it makes no difference whether we use a volume form or the associated volume density. In that sense, the second definition generalizes the first.