No, this cannot be done.
One naive way to go about constructing such a mapping would be to imagine that we just erase the phase and leave everything else untouched. This would map $\sqrt{p}\vert 0\rangle+e^{i\theta}\sqrt{1-p}\vert 1\rangle\to\sqrt{p}\vert 0\rangle+\sqrt{1-p}\vert1\rangle$. This is not an allowed mapping because it violates unitarity, e.g., as I pointed out in the comment, it would map both $\vert \pm\rangle\to\vert+\rangle$ -- making it so that the mapping is irreversible and thus, not unitary.
However, one might think that one can construct a more general mapping that maps
$$\sqrt{p}\vert0\rangle+e^{i\theta}\sqrt{1-p}\vert 1\rangle\to\sqrt{q}\vert 0\rangle+\sqrt{1-q}\vert 1\rangle$$
that somehow encodes both $p,\theta$ into $q$ so as to avoid being non-unitary. I'm not sure if such a mapping exists or not -- however, it is easy to see that no such mapping exists that is both unitary and linear (which is what a quantum operation ought to be).
Let's say $U$ is such a mapping. Let's say
$$U\vert 0\rangle =\sqrt{p}\vert 0\rangle + \sqrt{1-p}\vert 1\rangle$$
$$U\vert 1\rangle =\sqrt{q}\vert 0\rangle + \sqrt{1-q}\vert{1}\rangle$$
Now, by linearity,
\begin{align}
U\bigg(\frac{\vert 0\rangle+i\vert 1\rangle}{\sqrt{2}}\bigg)&=\frac{\sqrt{p}+i\sqrt{q}}{\sqrt{2}}\vert 0\rangle+\frac{\sqrt{1-p}+i\sqrt{1-q}}{\sqrt{2}}\vert1\rangle\\
&=\sqrt{r}e^{i\theta_1}\vert 0\rangle + \sqrt{1-r}e^{i\theta_2}\vert 1\rangle
\end{align}
where
\begin{align}
&\ r=\frac{p+q}{2}\\
\sin\theta_1 = \frac{\sqrt{q}}{\sqrt{p+q}},&\ \cos\theta_1 = \frac{\sqrt{p}}{\sqrt{p+q}}\\
\sin\theta_2 = \frac{\sqrt{1-q}}{\sqrt{2-{p-q}}},&\ \cos\theta_2 = \frac{\sqrt{1-p}}{\sqrt{2-{p-q}}}
\end{align}
Now, the relative phase would be $\phi\equiv\theta_2-\theta_1$. It can be calculated that
\begin{align}
\sin\phi\equiv\sin(\theta_2-\theta_1)=\frac{\sqrt{1-q}\sqrt{p}-\sqrt{1-p}\sqrt{q}}{\sqrt{p+q}\sqrt{2-p-q}}
\end{align}
Thus, for $\phi=0$, we need
\begin{align}
&\sqrt{1-p}\sqrt{q}=\sqrt{p}\sqrt{1-q}\\
\implies &\sqrt{\frac{1}{p}-1}=\sqrt{\frac{1}{q}-1}\\
\implies &p=q
\end{align}
Thus, we have got $U\vert 0\rangle=U\vert 1\rangle$ meaning that $U$ is not unitary, i.e., a contradiction, i.e., such a mapping does not exist.
I've assumed throughout that $p+q\neq 0$ and $p+q\neq 2$. However, it is clear that these conditions can be violated only if $p=q=0$ or $p=q=1$ -- in which case, again, $U$ won't be unitary because $p=q$ implies non-unitary $U$.