Let $D(\tau) = \Delta(\tau)/q = \prod_{n=1}^\infty (1-q^n)^{24} = 1 - 24q + 252q^2 + \cdots$, where $q = e^{2 \pi i \tau}$. This is a holomorphic function on $\mathbb{H}$ that takes the value 0 at all rational cusps and 1 at infinity. Therefore, any finitely supported function $f$ on $\mathbb{Q}$ can be extended using linear combinations of $D(\frac{a \tau + b}{c\tau + d})$, as $\left(\begin{smallmatrix} a & b \\ c & d \end{smallmatrix} \right)$ ranges over a choice of elements of $SL_2(\mathbb{Z})$ such that the set of rationals $a/c$ cover the support of $f$. For functions with infinite support, I do not have an answer. You may be able to obtain a normally convergent sum by choosing an order on the cusps, using suitably increasing powers of $D$, or employing cusp forms of higher level.