Let $M$ be an almost surely continuous martingale that is not almost surely constant in time - that is, it is not the case that almost surely, $M_t = M_0$ for all $t$.
Assume further that $M$ is a time homogeneous Markov process, and that it is transitive, in the sense that for any measurable subset $U$ of $\mathbb R$ with nonzero Lebesgue measure, we have
$$\mathbb E\big[\int_0^\infty \mathbf 1_U (M_t) \, dt \big] > 0.$$
Suppose $f: \mathbb R \to \mathbb R$ is a continuous function such that $f(M_t)$ is a martingale.
Question: Does if follow that $f$ is necessarily an affine linear function? That is, $f(x) = a + bx$ for some $a, b \in \mathbb R$.