This is true, and here is one way of showing it. First consider a chart $(U, x)$ on $M$. There exist smooth functions $f, g : U \to \mathbb{R}$ such that
\begin{align*}
\alpha &= g \, dx^1 \wedge \cdots \wedge dx^n \\
\beta &= h \, dx^1 \wedge \cdots \wedge dx^n.
\end{align*}
Since, $\alpha, \beta$ are no-where vanishing, so are $g, h$. Thus, $f= \frac{g}{h}$ is well-defined and satisfies that $\alpha = f \beta$ on $U$. Now you can make an argument using a partition of unity and the fact that by compactness you may cover $M$ with finitely many chart domains, the details of which I leave to you, to show that you can make this work globally on $M$.