First, under Black-Scholes we have the usual method to transform the discounted asset price into a martingle: Let the asset price $S_t$ be goverend by $$ dS_t = \mu S_t dt + \sigma S_t dW_t, $$ so \begin{align*} d(e^{-rt}S_t) & = -re^{-rt}S_tdt + e^{-rt}\left(\mu S_t dt + \sigma S_t dW_t\right) \\ & = \sigma e^{-rt}S_t\left( \frac{\mu - r}{\sigma}dt + dW_t \right). \end{align*} Set $\gamma = \frac{\mu - r}{\sigma}$ and let $\tilde{W}_t = W_t + \gamma t$, a $\mathbb{Q}$-BM. We then get that our discounted asset price process is a $\mathbb{Q}$-martingale, and we can begin pricing options: $$ d(e^{-rt}S_t) = \sigma e^{-rt}S_t d\tilde{W}_t. $$
Now, what if the asset price is goverened by some other SDE, e.g. a mean-reverting process given by the SDE $$ dS_t = \kappa(\theta - S_t)dt + \sigma dW_t. $$ Following the same method as above, I get \begin{align*} d(e^{-rt}S_t) & = -re^{-rt}S_tdt + e^{-rt}\left(\kappa(\theta - S_t)dt + \sigma dW_t\right) \\ & = e^{-rt}\left[(\kappa(\theta - S_t) - rS_t)dt + \sigma dW_t \right]. \end{align*} The problem here is this SDE for the discounted asset price is not in terms of the disounted price itself, i.e., there is no explicit $e^{-rt}S_t$ multiplying the RHS. Hence, even using the closed-form solution for $S_t$ and letting $\gamma = \frac{\kappa(\theta - S_t) - rS_t}{\sigma}$ (again $\tilde{W}_t = W_t + \gamma t$), we get $$ d(e^{-rt}S_t) = \sigma e^{-rt}\tilde{W}_t, $$ which is not a martingale in the variable $e^{-rt}S_t$ as needed. Is there a framework for these sort of mean-reverting processes?