Let us first clarify that things like $\hat{x}\,\psi(x)$ in fact mean
$$ (\hat{x}\psi)(x) \equiv \langle x| \hat{x} |\psi\rangle \quad .$$
We further define the wave function as
$$ \psi(x) \equiv \langle x|\psi\rangle \quad. $$
Similar equations hold for the case of the momentum operator / basis.
In the following we set $\hbar=1$.
The position representation of the position and momentum operator is (very nicely explained here):
\begin{align}
\langle x|\hat{x} &= \langle x| \,x \\
\langle x| \hat{p} &= - i \,\frac{\mathrm{d}}{\mathrm{d}x} \langle x| \quad .
\end{align}
This should look familiar to you: Evaluated in the position basis, the position operator acts as a multiplicative operator while the momentum operator acts as a derivative. Using the conventions from the beginning we then find
\begin{align}
(\hat{x}\psi)(x) &= x\, \psi(x) \\
(\hat{p}\psi)(x) &= - i \,\frac{\mathrm{d}}{\mathrm{d}x} \psi(x) \quad ,
\end{align}
which means for example that the projection of the vector $\hat{x}|\psi\rangle$ onto a state of the position basis is the number $ x\, \psi(x)$.
However, this does not mean that the momentum operator is a derivative; in the same sense, the position operator is not an operator multiplying 'everything' it acts on with $x$. Indeed, evaluated in the momentum basis, we find that the momentum operator is multiplicative and the position operator acts as a derivative:
\begin{align}
\langle p | \hat{x} &= i\, \frac{\mathrm{d}}{\mathrm{d}p} \langle p|\\
\langle p | \hat{p } &= \langle p |\,p \quad .
\end{align}
See also this question and the links therein. This tells us that e.g. the projection of the vector $\hat{x}|\psi\rangle$ onto an element of the momentum basis is the number $i\, \frac{\mathrm{d}}{\mathrm{d}p} \psi(p)$.
Finally, by making use of the completeness relations $\displaystyle \mathbb I = \int \mathrm dx \, |x\rangle \langle x| = \int \mathrm dp \, |p\rangle\langle p|$, we can express the action of the position operator $\hat{x}$ on a state $|\psi\rangle$ either as
$$ \hat{x}|\psi\rangle = \int \mathrm{d}x\, x\, |x\rangle \langle x|\psi\rangle$$
or
$$\hat{x}|\psi\rangle = i\,\int \mathrm{d}p \, |p\rangle \frac{\mathrm{d}}{\mathrm{d}p}\langle p|\psi\rangle \quad .$$
Regarding your example: We know that $\langle x |p\rangle = e^{ipx}$ (up to some constant factor which I'll omit) and let's say we want to calculate $ \langle x |\hat{x}|p\rangle$, which is I think you meant by $\hat{x}\, e^{ipx}$.
Using the position representation of the position operator, we easily find
$$\langle x |\hat{x}|p\rangle = x \, \langle x|p\rangle = x \,e^{ipx} \quad . $$
Performing the calculation within the momentum representation of the position operator yields:
$$\langle x |\hat{x}|p\rangle = \left({\langle p |\hat{x}^\dagger|x\rangle }\right)^* = \left({\langle p |\hat{x}|x\rangle }\right)^* = \left(i \frac{\mathrm{d}}{\mathrm{d}p} e^{-ipx}\right)^* = x \, e^{ipx} \quad ,$$
as expected.