I have two points in $3$-D coordinates, $F_1(p, q, r)$, $F_2(j, k, l)$ and a variable $a$. I have to check if a point $P(x,y,z)$ shall fall inside a prolate spheroid which has $F_1$ and $F_2$ as focal points and $a$ as the semi-major axis.
Can I extend this definition of an ellipse to a spheroid for this check?
The sum of the distances to the two foci is constant for every point on the curve.
That is $$\sqrt{(x−p)^2+(y−q)^2+(z−r)^2}+\sqrt{(x−j)^2+(y−k)^2+(z−l)^2} \le 2a$$
Yes, you can definitely extend the definition of the ellipse to three dimensions in this way. However, if you’re going to be testing a lot of points, it might be more efficient to compute an implicit Cartesian equation $f(x,y,z)=0$ of the spheroid. You can arrange for the coefficients of the squared terms to be positive, and in that case, the point is inside (or on) the spheroid iff $f(x,y,z)\le0$. This avoids the possibly expensive square root computations.
You have the half-focal distance $f=\frac12F_1F_2$ and semiaxis length $a$. The other semiaxis length is $b=\sqrt{a^2-f^2}$ and so the equation in standard position of this spheroid is $${x^2\over a^2}+{y^2\over b^2}+{z^2\over b^2}=1.$$ You then need to rotate and translate this into place. The translation part $\mathtt T$ is straightforward: the center of the spherioid is the midpoint of the foci $C=\frac12(F_1+F_2)$ and so $$\mathtt T = \begin{bmatrix}1&0&0&-C_x\\0&1&0&-C_y\\0&0&1&-C_z\\0&0&0&1\end{bmatrix}.$$ For the rotation, you need to align the $x$-axis with the line through the foci. Set $\mathbf u$ to $F_2-F_1$, normalized. At least two of $(0,u_z,-u_y)$, $(-u_z0,u_x)$ and $(u_y,-u_x,0)$ are nonzero and are perpendicular to $\mathbf u$. Choose one of them and normalize to get the vector $\mathbf v$ (the symmetry of the spheriod means that it doesn’t matter which one you choose). Finally, set $\mathbf w = \mathbf u\times\mathbf v$. These unit vectors form the required rotation matrix $\mathtt R$: $$\mathtt R = \left[\begin{array}{c|c}\mathbf u & 0 \\ \mathbf v & 0 \\ \mathbf w & 0 \\ \hline \mathbf 0 & 1\end{array}\right].$$ Finally, construct the matrix $$\mathtt S = \mathtt T^T\mathtt R^T\operatorname{diag}\left(\frac1{a^2},\frac1{b^2},\frac1{b^2},-1\right)\,\mathtt R\mathtt T.$$ The test for a point $(x,y,z)$ lying within the spheroid is then $(x,y,z,1)\,\mathtt S\,(x,y,z,1)^T\le0$.