I'm assuming that by "the projection of $f(x,y)$ along the line", you mean
$\iint \delta(x\cos\theta+y\sin\theta-t)f(x,y)\mathrm{d}x\mathrm{d}y\;.$
The trick is to transform to coordinates where the ellipse becomes a circle. Any circle would do, but the calculation is easiest and most symmetric using the unit circle, i.e. x=Ax' and y=By':
\begin{eqnarray} && \iint \delta(x\cos\theta+y\sin\theta-t)f(x,y)\mathrm{d}x\mathrm{d}y\\ &=& AB \iint \delta(x'A\cos\theta+y'B\sin\theta-t)f(x,y)\mathrm{d}x'\mathrm{d}y' \\ &=& \frac{AB}{a(\theta)} \iint \delta\left(\frac{x'A\cos\theta}{a(\theta)}+\frac{y'B\sin\theta}{a(\theta)}-\frac{t}{a(\theta)}\right)f(x,y)\mathrm{d}x'\mathrm{d}y'\;, \end{eqnarray}
where I've used $a(\theta)$ as you defined it and the identity $\delta(x)=\lambda\delta(\lambda x)$.
Now this transformed integral describes exactly the same kind of problem, but with a line through the unit circle, since the coefficients of $x$ and $y$ are normalized such that their squares add to $1$, so that we can regard them as the cosine and sine, respectively, of some angle. We don't need to know that angle, though, since the length of the chord of a line intersecting the circle is independent of that angle and is determined entirely by its distance from the origin, which in this case is $t/a(\theta)$. By Pythagoras, the length of the chord at distance $s$ from the origin in the unit circle is $2\sqrt{1-s^2}$ for $\lvert s\rvert \le1$, so, taking into account that $f=\rho$ along the line, we get
$\rho\frac{AB}{a(\theta)}2\sqrt{1-\left(\frac{t}{a(\theta)}\right)^2}=\frac {2 \rho A B} {a^2 (\theta) } \sqrt { a^2 (\theta) - t^2 } \;\;\mathrm{for}\;\; \lvert t \rvert \le a(\theta)\;,$
as expected.