According to the comments, I understand you to mean the following local question: Say $D$ is the quaternion division algebra over an $p$-adic field $F$,
and $\pi$ is a smooth representation of $D^\times$. Can we regard its matrix coefficients as having support in $Z \cdot$ GL(2,$\mathcal O_E$) for a quadratic extension $E/F$? (Here $Z \simeq F^\times$ is the center.)
No this is not true. Here $\pi$ is a finite dimensional representation, so you can take the formal degree to be the dimension. The simplest case is $\pi$ is 1-dimensional, and thus of the form $\mu \circ N_{D/F}$ where $\mu$ is a character of $F^\times$ and $N_{D/F}$ denotes the reduced norm. This character is its own matrix coefficient, and the support is all of $D^\times$.
For general $\pi$, here is the reason for unramified $E/F$. If $\varpi_D$ is a uniformizer for $D$, then it will not embed in $Z \cdot$ GL(2,$\mathcal O_E$), but $\pi(\varpi_D)$ must have nonzero matrix coefficients. (For ramified $E/F$, similarly choose a $g \in D^\times$ which does not map into $Z \cdot$ GL(2,$\mathcal O_E$) for your choice of embedding.)