Ok, this is a bit late and you might have solved it already by yourself. But I stumbled upon this question on Google because I too had this problem, I'm hoping people with the same problem can find this solution. There is a quirk that few books discuss which only happens in dimension 1. With your definition (and most) the interval $[0,1]$ does not have an oriented atlas. This is easy to see because, as you said, the local charts at the endpoints have opposite orientations and any other collection of charts is going to flip monotonicity at some point and at this point the orientations will be incompatible.
To fix this you define a manifold with boundary distinguishing two cases (sorry to change your definition, but it's only a superficial change): in dimension $n >1$ a (topological) manifold with boundary is a second countable Hausdorff topological space locally homeomorphic to $\mathbb{H}^n = \{x \in \mathbb{R}^n\,:\, x^n \geq 0\}$ (this is just the usual definition). If $n = 1$ then you define a $1$-dimensional topological manifold with boundary as a second countable Hausdorff topological space where at each point $p$ there is a neighborhood $U$ of $p$ and a map $\varphi : U \to \mathbb{R}$ where $\varphi(U)$ is open in either $\mathbb{H}^1$ or $\mathbb{H}^1_{-} = \{x \in \mathbb{R} : x \leq 0\}$ with the relative topology and $\varphi_{|U}$ is a homeomorphism.
Now you define everything else (smooth manifold, orientation, etc.) as usual. With this definition you can give $[0,1]$ the structure of a smooth manifold with boundary using the charts: $(U = [0,1)$, $\varphi(x) = x)$ and $(V = (0,1]$, $\psi(x) = x-1)$, which are clearly compatible orientation-wise.
This is the approach given in Loring Tu: An introduction to manifolds, he specially discusses this difficulty in page 254; example 22.9.
Best Answer
The orientataion on $M$ would induces an orientation on $\partial M$. You can take a look at
Inducing orientations on boundary manifolds
An orientation on $\partial M$ is really a nowhere vanishing $n-1$-form $\omega$ on $\partial M$. This form satisfies $\int_{\partial M} \omega \neq 0$. By taking $-\omega$ if necessary, we can assume $\int_{\partial M} \omega >0$.
Now assume that $f : M \to \partial M$ exists. Then consider $i : \partial M \to M$ the inclusion. By condition on $f$, we have $f \circ i =id$ on $\partial M$. Let
$$\beta = f^*\omega$$
be a $n-1$ form on $M$. Then
$$\int_{\partial M} \omega = \int_{\partial M} (f\circ i)^*\omega = \int_{\partial M} i^*f^* \omega = \int_{\partial M} i^* \beta = \int_M d\beta$$
where the last step is Stokes theorem. But
$$d\beta= d f^* \omega = f^*d\omega = 0$$
(as $\omega$ is an $n-1$ form on $\partial M$, which has to be closed.)
Thus $\int_{\partial M} \omega= 0$ and it is a contradiction. Thus such an $f$ does not exist.