First, I want to note that this is not a full solution, it just makes finding $a,b$ with $\frac 1a+\frac 1b=\frac pq$ a little easier.
All solutions to $$a+b|ab$$ are $(a,b)=(\alpha\gamma(\alpha+\beta),\beta\gamma(\alpha+\beta))$ for some $\alpha,\beta,\gamma$.
So if $$\frac 1a+\frac 1b=\frac 1n$$ then substitution yields $n=\alpha\beta\gamma$. But we wish to find solutions to $\frac 1a+\frac 1b=\frac pq$ or, when dividing by $p$, we need $$\frac 1{pa}+\frac 1{pb}=\frac 1q$$
So $\alpha\beta\gamma=q$, and $ap=\alpha\gamma(\alpha+\beta)$ and $bp=\beta\gamma(\alpha+\beta)$. But since $\gcd(p,q)=1$, we know that $p|\alpha+\beta$.
We'll try to get $a$ and $b$ as low as possible now too see whether or not they can get less than or equal to $n$. We have a factorization of $q$, namely $\alpha\beta\gamma$, but we also need $p|\alpha+\beta$, where $p\not|\alpha,\beta$, as well as $ap,bp\leq n$. As you can see, the solvability of this highly depends on the factorization of $p$ and $q$, so I don't think there's a closed formula for it. The result does however give you an easier method to seeing whether or not there is a solution to $\frac 1a+\frac 1b=\frac pq$.