I consider a Casselman type of local newform theory on quaternion algebras in my paper on the basis problem (sections 2 and 3), which gives you a positive answer to your question half of the time (Cases 1 and 2 below). Here is a brief summary. For simplicity, I'll assume trivial central characters.

Let's say $\pi'$ is the Jacquet-Langlands transfer of $\pi$ to GL(2) and the conductor is $n$. Then $n$ is the minimal positive integer such that $\pi$ is trivial on $U_D^{n-1}=1+P_D^{n-1}$, the $(n-1)$-st higher unit group in $D$ (here $P_D$ is the prime ideal of $D$). Incidentally this is a *normal* subgroup of $D$, so $\pi$ factors through the finite group $D^\times/U_D^{n-1}$.
Thus if you want an open $K$ such that $\dim \pi^K = 1$ we may as well assume $K$ contains $U_D^{n-1}$.

**Case 1:** $\pi'$ is special, so $\pi$ is 1-dimensional (factors through the reduced norm as you observed). Then you can just take $K=U_D^{n-1}$
and $\dim \pi^K = 1$.

**Case 2:** $\pi'$ is supercuspidal of conductor $n=2m+1$. Then you can take $K=O_E^\times U_D^{2m}$ where $E/F$ is the unramified quadratic extension,
and $\dim \pi^K = 1$ (see Theorem 3.5 in my paper).

**Case 3:** $\pi'$ is supercuspidal of conductor $n=2m$. For simplicity also assume $\pi$ is minimal (conductor is minimal among twists). Then you can take $K = O_E^\times U_D^{2m-1}$ where $E/F$ is any ramified quadratic extension to get $\dim \pi^K = 2$.
Here there is no subgroup that contains a maximal quadratic order which will give you dimension 1 (if you take $E$ unramified, the dimension is 0). But you can pick out a 1-dimensional space by specifying how $\pi$ acts on a unifomizer $\varpi_D$ (necessarily $\pm 1$).

Subgroups $K$ of the above form are unit groups of Hijikata-Pizer-Shemanske orders and are natural objects to consider for certain reasons. I do not know whether there are other subgroups one can use to get dimension 1 in Case 3, but I know of no suitable natural choices.

Note by allowing $K$ to be non-compact however (adjoin in $\langle \varpi_D \rangle$) you can get $\dim \pi^K = 1$ but to me choosing this vector in the 2-dimensional space given in Case 3 is not really the right thing to do for a local newform theory. My feeling is that you would just picking out a 1-dimensional space arbitrarily for the sake of getting a 1-dimensional space, but it would make more sense to pick the vector whose eigenvalue for $\varpi_D$ matches with an epsilon factor. This however depends upon $\pi$.