No, there is no quantum algorithm $\mathcal{D}$ that given a single copy of a quantum state $\rho$ as input determines whether $\rho$ is pure or mixed.
Quantum mechanics argument
By the principle of deferred measurement, we can assume that $\mathcal{D}$ corresponds to a unitary $U$ followed by a measurement of an observable $M$. Suppose that the eigenvalue $\lambda$ of $M$, with associated eigenspace projector $P_\lambda$, is meant to signify that the input is pure. Further, assume that on pure input the last step in $\mathcal{D}$, i.e. the measurement of $M$, yields $\lambda$ with probability no less than $p$ (if $\mathcal{D}$ is deterministic then $p=1$). Then
$$
\mathrm{tr}(U|\psi\rangle\langle \psi|U^\dagger P_\lambda) \ge p
$$
for all pure states $|\psi\rangle$. Now, consider a mixed state
$$
\rho = \sum_kp_k|k\rangle\langle k|.
$$
By linearity, we see that
$$
\mathrm{tr}(U\rho U^\dagger P_\lambda) \ge p.
$$
Moreover, since the set of pure states is contained in the closure of the set of mixed states, by continuity we also get the converse. This means that $\mathcal{D}$ fails to distinguish between pure and mixed states.
Computer science argument
We will show that the ability to distinguish pure and mixed states confers the ability to solve all problems in NP. This means that, from computer science perspective, it is highly unlikely that a quantum algorithm for the task exists.
To that end, we will show how to use $\mathcal{D}$ to solve SAT. Let $\phi$ be a boolean formula with $n$ variables $x_1, \dots, x_n$. There is a circuit $U_\phi$ with size polynomial in the size of $\phi$ such that
$$
U_\phi|b_1\dots b_n\rangle|y\rangle = |b_1\dots b_n\rangle|y\oplus \phi(b_1,\dots,b_n)\rangle
$$
for $b_i\in\{0, 1\}$ with $i=1,\dots,n$.
In order to determine whether $\phi$ is satisfiable, we proceed as follows. Prepare $n+1$ qubits in the $|0\rangle$ state. Apply Hadamard to qubits $1$ through $n$. Apply $U_\phi$ to all qubits.
At this point the $n+1$ qubits are in the pure state
$$
|\psi\rangle = |\psi_0\rangle|0\rangle + |\psi_1\rangle|1\rangle\tag1
$$
where $|\psi_0\rangle$ is the unnormalized superposition of bitstrings corresponding to the unsatisfying assignments of $\phi$ and $|\psi_1\rangle$ is the unnormalized superposition of bitstrings corresponding to the satisfying assignments of $\phi$. If $\phi$ has both satisfying and unsatisfying assignments then both terms in $(1)$ are non-zero and $|\psi\rangle$ is entangled. Therefore, the state $\rho=\mathrm{tr}_{n+1}(|\psi\rangle\langle\psi|)$ of qubits $1$ through $n$ is mixed. On the other hand, if $\phi$ is constant, i.e. either all its assignments are satisfying or all its assignments are unsatisfying then one of the terms in $(1)$ is zero and $\psi$ is separable. Consequently, $\rho$ is pure.
Therefore, as the final step of our SAT solver we discard the qubit $n+1$ and feed qubits $1$ through $n$ to $\mathcal{D}$. If $\mathcal{D}$ indicates that the state $\rho$ of qubits $1$ through $n$ is mixed then $\phi$ is satisfiable. Otherwise, $\phi$ is constant and we compute $\phi(0, \dots, 0)$ to check whether $x_1=\dots=x_n=0$ is a satisfying assignment. If it is, then $\phi$ is satisfiable. Otherwise, it is unsatisfiable.
Finally, SAT is NP-complete, so if $\mathcal{D}$ exists then all problems in NP can be solved on a quantum computer.
Intuition
The intuition behind the arguments above is that the set of pure states is a "razor thin" subset of the set of all states. More formally, it is a zero measure subset of the set of all states. The ability to determine membership in such a set is akin to a measurement of infinite precision and therefore unphysical.