Suppose you are given either $\rho_1$ or $\rho_2$, and you also know that the probabilities you got one or the other are $p_1$ and $p_2$, respectively. If you have no prior knowledge of the frequencies with which I'm going to give you one state or the other, you just use $p_1=p_2=1/2$.
You are asking what's the measurement that optimally distinguishes between these two states. If you assume a two-outcome measurement (i.e. you want a measurement that answers either "$1$" or "$2$"), then you are dealing with a two-outcome POVM $\{\mu(1),\mu(2)\}$, where $\mu(1)+\mu(2)=I$. We want this measurement to give the outcome "$i$" is the state you got is $\rho_i$.
That this measurement is "optimal" means that the average success probability is maximal. The average success probability reads
$$p_{\rm success}(\mu) \equiv \sum_i \langle\mu(i), p_i\rho_i\rangle
= \langle\mu(1), p_1\rho_1\rangle
+ \langle\mu(2), p_2\rho_2\rangle.$$
Using the normalisation condition on the POVM, we get
$$p_{\rm success}(\mu) = p_2 +
\langle\mu(1), p_1\rho_1- p_2\rho_2\rangle,
$$
and thus
$$\mu_{\rm optimal} \equiv \operatorname*{argmax}_\mu p_{\rm success}(\mu)
= \operatorname*{argmax}_\mu
\langle\mu(1), p_1\rho_1- p_2\rho_2\rangle.$$
So the task is reduced to finding an operator $0\le \mu(1)\le I$ (i.e. a possible component of a POVM) that maximises $\langle\mu(1),\rho\rangle\equiv\operatorname{Tr}(\mu(1)\Delta\rho)$ for some Hermitian operator $\Delta\rho$. If $\Delta\rho=\sum_k \lambda_k |\lambda_k\rangle\!\langle\lambda_k|$, this is
$$\langle\mu(1),\rho\rangle
= \sum_k \lambda_k \langle \lambda_k|\mu(1)|\lambda_k\rangle.$$
It is then not surprising that to maximise this quantity we want $\mu(1)$ to have maximal (i.e. $1$) eigenvalues on all and only the directions $|\lambda_k\rangle$ corresponding to $\lambda_k\ge0$, i.e.
$$\mu(1) = \sum_{k :\, \lambda_k>0}|\lambda_k\rangle\!\langle\lambda_k|.$$
Entirely analogous reasoning will lead you to the optimal choice of $\mu(2)$ being
$$\mu(2) = \sum_{k :\, \lambda_k<0}|\lambda_k\rangle\!\langle\lambda_k|.$$
Note that there is something missing here: if $\Delta\rho$ has zero eigenvalues, $\mu(1)+\mu(2)\neq I$. This can be solved by either including the projections onto the eigenvectors with vanishing eigenvalues in $\mu(1)$ or $\mu(2)$ (in any way one likes, it won't matter), or by considering a three-outcome POVM, and shove all those projections on the third outcome, so that $\mu(3)=I-\mu(1)-\mu(2)$. The latter is the method used in the linked answer. The reason it doesn't matter which choice we make here is that these are directions which are essentially "unsolvable". They correspond to components of the given states that are fully indistinguishable.
So in summary, the optimal distinguishing measurement is indeed a projective one, with a caveat: you can get an optimal non-projective measurement, if $\Delta\rho$ has nonzero kernel, putting part of the corresponding projector on $\mu(1)$ and the other on $\mu(2)$.
As an example of this, consider the case with $p_1=p_2=1/2$ and
$$\rho_1=\frac23\begin{pmatrix}1/2 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0&0\end{pmatrix},
\qquad
\rho_2=\frac23\begin{pmatrix}1/2 & 0 & 0 \\ 0 & 1/2 & 1/2 \\ 0 & 1/2 & 1/2\end{pmatrix}.$$
Then, the nonzero eigenvalues of $\Delta\rho$ are $\lambda_\pm=\pm\sqrt2/3$, and a possible non-projective optimally distinguishing two-outcome POVM is
$$\mu(1) = |\lambda_+\rangle\!\langle\lambda_+| + \frac12 |0\rangle\!\langle0|, \\
\mu(2) = |\lambda_-\rangle\!\langle\lambda_-| + \frac12 |0\rangle\!\langle0|.$$