This can be accomplished using inverse transformation sampling; it does not require a restriction on the desired distribution function. To do this, define $X \equiv f(\theta,\omega) \equiv \inf \{ r \in \mathbb{R} | F_\theta(r) \geqslant \omega \}$$^\dagger$ where $F_\theta$ is the desired distribution function conditional on the parameter $\theta$. Since the distribution $F_\theta$ is non-decreasing we have:
$$\inf \{ r \in \mathbb{R} | F_\theta(r) \geqslant \omega \} \leqslant x \quad \quad \iff \quad \quad F_\theta(x) \geqslant \omega .$$
Hence, taking $\omega \sim \text{U}(0,1)$ independent of the parameter $\theta$ you then get:
$$\begin{equation} \begin{aligned}
\mathbb{P}(X \leqslant x | \theta)
&= \mathbb{P} \Big( \inf \{ x \in \mathbb{R} | F_\theta(x) \geqslant \omega \} \leqslant x \Big| \theta \Big) \\[6pt]
&= \mathbb{P} \Big( \omega \leqslant F_\theta(x) \Big| \theta \Big) \\[6pt]
&= F_\theta(x), \\[6pt]
\end{aligned} \end{equation}$$
which is the desired distribution for $X$ conditional on the parameter $\theta$. As you can see, there is no requirement on $F_\theta$ for this technique to work, though it is notable that it is not necessarily the most computationally efficient technique to generate your desired random variable. This technique can be extended to multivariate problems as shown in this related question.
$^\dagger$ This infimum function is the "generalised inverse" of $F_\theta$. In the case where $F_\theta$ is continuous you get $\inf \{ r \in \mathbb{R} | F_\theta(r) \geqslant \omega \} = F_\theta^{-1}(\omega)$, which is the inverse in the regular functional sense.