The only constraint on a particle's wavefunction $\psi$ is that it must be square-integrable - i.e. $\int_{-\infty}^\infty \overline{\psi(x)} \psi(x) \mathrm dx < \infty$. So it's perfectly possible to have an entirely $\mathbb R$-valued wavefunction, or an entirely imaginary ($i\mathbb R$-valued) wavefunction, or neither. Additionally, given an arbitrary operator $\mathcal O$, the expected value
$$\langle\mathcal O\rangle_\psi = \langle \psi,\mathcal O\psi\rangle$$
is generally $\mathbb C$-valued and need not belong to $\mathbb R$.
However if $\mathcal O$ happens to be self-adjoint so that $\mathcal O^\dagger = \mathcal O$, it's easy to see that the expected value must be real:
$$\langle \mathcal O\rangle_\psi = \langle \psi,\mathcal O\psi\rangle = \langle \mathcal O\psi,\psi\rangle = \overline{\langle \psi,\mathcal O \psi\rangle} = \overline{\langle \mathcal O\rangle_\psi}$$
where the line denotes complex conjugation and we've used the fact that for self-adjoint operators, $\langle \psi,\mathcal O\phi\rangle = \langle\mathcal O\psi,\phi\rangle$.
For your example of the momentum operator for a particle on a line $P = -i \frac{d}{dx}$ and a wavefunction $\psi$ which is $\mathbb R$-valued, we have
$$\langle P\rangle_\psi = -i\int_{-\infty}^\infty \overline{\psi(x)}\psi'(x) \mathrm dx $$
which is $i$ multiplied by a manifestly real number. However, we are saved by the fact that if $\psi$ is real then $\overline{\psi(x)}=\psi(x)$ and so we have
$$\langle P\rangle_\psi = -i\int_{-\infty}^\infty \overline{\psi(x)}\psi'(x) \mathrm dx = -i \int_{-\infty}^\infty \frac{1}{2}\frac{d}{dx}\big(\psi(x)\big)^2 \mathrm dx = -\frac{i}{2} \big[\psi(\infty)^2 -\psi(-\infty)^2\big]$$
$$ = 0$$
Therefore, if $\psi$ is purely real then $\langle P\rangle_\psi=0$.