You can answer in the negative if you can show that $n$ is not a perfect square, modulo $d.$ This is easier to do if you can prime factorize $d.$ if not, you can only use the Jacoby symbol, which, if it returns $-1,$ proves that $n$ is not a square modulo $d,$ but a value of $1$ doesn't mean it is.
When $n>0,$ you can find a maximum $x$ to check, and solve the problem in finite time.
First solve for $a^2-db^2=1$ for smallest integer $a\geq 1$ and the corresponding positive $b.$
Then if $$x^2-dy^2=n\tag{1}$$ has a solution, it has a solution with: $$x\leq \sqrt{\frac{n(a+1)}{2}}$$
This is because if $(x,y)$ is a positive solution to (1), then so is $(xa-ydb,ay-xb).$
Now, if $-x<xa-ydb<x$ then we have a solution for a smaller positive $x.$ And that happens if:
$$x(a+1)>ydb>x(a-1)$$
All terms are positive, so we can square both side:
$$x^2(a+1)^2>y^2d^2b^2>x^2(a-1)^2$$
Substituting $dy^2=x^2-n$ you get:
$$x^2(a+1)^2>db^2(x^2-n)>(a-1)^2x^2.$$
Now, $db^2=a^2-1.$ Subtracting $db^2x^2$ from both sides gives you:
$$x^2(2a+2)>-n(a^2-1)>(2-2a)x^2.$$
Since $x^2(2a+2)$ is always positive, and $-n(a^2-1)$ is negative, the first inequality is always true.
So if $$\frac{n(a+1)}2=\frac{n(a^2-1)}{2(a-1)}<x^2$$
then we can find a smaller positive $x.$
So if there is a solution, there must be a solution with $$2\leq x \leq\sqrt{\frac{n(a+1)}{2}}$$
I think, for $n<0$ you can show there must be a solution with:
$$2\leq x
\leq \sqrt{\frac{-n(a-1)}2}$$
Of course, $a$ can be very large. When $d=97,$ $a= 1766319049.$
It's actually easier to check $y.$ You only have to check:
$$1\leq y\leq\sqrt{\frac{n(a-1)}{2d}}$$ when $n>0,$ and
$$1\leq y\leq\sqrt{\frac{-n(a+1)}{2d}}$$ when $n<0.$