Does a wavefunction have to be an eigenfunction of an operator in order to obtain an expectation value?
No, assuming that wavefunction is normalized, the expectation value $o$ of the operaror $\mathcal O $ is obtained as $\langle \Psi | \mathcal O | \Psi \rangle $.

EDIT

In response at your comment: I am not asking how to calculate the expectation value, I am asking why the wavefunction does not have to be an eigenfunction of the operator in order to calculate an expectation value

The fact that the expectation value is obtained with $\langle \Psi | \mathcal O | \Psi \rangle $ implies that there is no need that the wavefunction be an eigenfunction of the hermitian operator $\mathcal O$.

If it is an eigenfunction, then it is possible to get a simple expresion with:

$$ \langle \Psi | \mathcal O | \Psi \rangle = \langle \Psi | \mathcal O  \Psi \rangle =  \langle \Psi | \mathcal o  \Psi \rangle  = o  \langle \Psi | \mathcal   \Psi \rangle = o$$

If not the case, then you can not make the substiution  $\mathcal O  \Psi = o \Psi$. So, the application of the map $\mathcal O$ to $\Psi$ will be some function $\Omega$. Then, the expectation value will be  $\langle \Psi | \mathcal   \Omega \rangle$ that is an scalar that you can compute as
$$ \int d\mu \Psi^*\Omega$$