Is this the right way to implement ElGamal scheme over Elliptic Curves over prime field?
It does not matter what encoding scheme you use for the message, as long as it is reversible: you should be able to recover the message from e.
Assume you do not know $e$ or $R_x$ (the x-coordinate of $R$). You are given $$e \cdot R_x \mod p$$
For any possible message $e'$ that you could guess, there is some integer $n$ such that $$e'\cdot n \equiv  e \cdot R_x \mod p$$
(exercise: what is this $n$?)


If you could determine which of $e$ and $e'$ was the correct message, then you would be able to tell which of $n$ and $R_x$ is the correct x-value of the shared secret $R$. But we assume that the attacker is not able to distinguish $R$ from a random point on the curve (this is the Decisional Diffe Hellman assumption). 

Essentially, you do not need to worry about an adversary "factoring" $R_x \cdot e$, because in the integers mod $p$ there is not a unique way of factoring a number, for exactly the same reason that there is no unique way of factoring into rational numbers: $6 = 3\cdot 2$, but it also equals $4 \cdot \frac{2}{3}$ or $95 \cdot \frac{6}{95}$