You can always construct an M-curve with the property you asked for.
Let $L$ be a real line in the real projective plane and $d$ an even, respectively odd, integer. Then, there exists a real M-curve of degree $d$ intersecting $L$ in only pairs of complex conjugated points, respectively in $\frac {d-1} 2$ pairs of complex conjugated points and exactly one real point.
Proof: You can just modify a little bit the Harnack method. By Harnack’s construction, there exists a real M-curve $X$ of degree $d-1$ intersecting $L(\mathbb R)$ in $d-1$ real points (the line $L$ intersects only one real connected component of $X(\mathbb R)$). We can now perturb the union $XL$$X\cup L$ to a non-singular real curve $A$ of degree $d$ with the properties that we want. In fact, in order to construct $A$, it is enough to apply a small perturbation to the union $XL$$X\cup L$ with respect to $\frac d 2$ pairs of complex conjugated lines, respectively $\frac {d-1} 2$ pairs of complex conjugated lines and one real line (which must be chosen passing through a point of an appropriate connected component of $L(\mathbb R) \setminus X(\mathbb R)$).
To be more precise, we construct $A$ as the zero set of the following real homogeneous non-singular polynomial of degree $d$:
- let $f, g, h \in \mathbb R[x,y,z]$ be the homogeneous polynomials associated respectively to $X$, $L$ and the union of the lines chosen for the small perturbation;
- then, there exists a small enough real non-zero number $b$ such that $$A = \{(x,y,z) \in \mathbb R \mid f(x,y,z) g(x,y,z) + b h(x,y,z) = 0 \} \ .$$
Hope it was helpful.