To give a less trivial example:
Take i.e. integral domains $R_1, R_2$. Then the inclusion $i : R_1 \to R_1 \times R_2$ is a morphism (which doesn't send $1_{R_1}$ to $1_{R_1 \times R_2} = (1_{R_1}, 1_{R_2})$). Moreover, $R_1 \times \{0\}$ is a prime ideal whose preimage is $R_1$ which is not prime.
Edit: This is never the case if the map isn't unital. Let $\psi : R \to R'$. Then $\psi(1) = e$ is idempotent, i.e. $e^2 = e$. Then also $1-e$ is idempotent and we have a decomposition $R' = eR \oplus (1-e)R = R_1 \oplus R_2$, which is non-trivial if $e \neq 0_{R'},1_{R'}$. It is a well-known fact, that the prime ideals in $R_1 \oplus R_2$ are of the form $P_1 \oplus R_2$ or $R_1 \oplus P_2$ for a prime ideal $P_i \subseteq R_i$. So, take a prime ideal $P \subseteq R_2$, then $R_1 \oplus P$ is prime in $R' = R_1 \oplus R_2$ and its preimage under $\psi$ is $R$.