Yes, if $E/M$ is a vector bundle of rank $k$, you can embed that bundle inside the trivial bundle $M \times \Bbb R^n$ over $M$ for large enough $n$, and that gives a map $M \to \text{Gr}(k, n)$ by sending each point $p$ in $M$ to the embedding $\Bbb R^k \hookrightarrow \Bbb R^n$ (a $k$-dimensional subspace of $\Bbb R^n$) induced from the embedding $E \hookrightarrow M \times \Bbb R^n$. By varying $n$, you do get a map $M \to \text{Gr}(k, \infty)$ classifying $E/M$.
There are two ways to see that vector bundles of rank $k$ are also classified by maps $M \to BO(k)$: one is to directly note that $\text{Gr}(k, n)$ is a quotient of the Stiefel manifold, $V(k, n)$, consisting of all the orthonormal $k$-frames in $\Bbb R^n$. The map $p : V(k, n) \to \text{Gr}(k, n)$ sending a $k$-frame to the $k$-dimensional subspace spanned by them, is a principal bundle with fibers being acted upon freely and transitively by $O(k)$. Since for $n = \infty$ (direct limit), $V(k, \infty)$ is weakly contractible, we conclude $\text{Gr}(k, \infty)$ is a $BO(k)$ by definition.
On the other hand, you could understand that vector bundles of rank $k$ correspond bijectively to principal $O(k)$-bundles; take an arbitrary vector bundle $E/M$, reduce the structure group to $O(k) \subset GL_k(\Bbb R)$ by imposing a Riemannian metric, so that the cocycles $\varphi_{ij} : U_i \cap U_j \to O(k)$ are $O(k)$-valued. Construct a new principal bundle out of $\bigsqcup U_i \times O(k)$ with $U_i$ running over the bundle charts, and by identifying $(x, v) = (x, \varphi v)$ on overlaps. This is exactly the orthonormal frame bundle of $E$, which is a principal $O(k)$-bundle. Now principal $G$-bundles are classified by maps to $BG$, so vector bundles $E/M$ of rank $k$ are classified by the classifying map $M \to BO(k)$ of the orthonormal frame bundle of $E$.