So, under this generality, it seems to me that we can choose $A$ in a clever way: if we make $A$ smaller, then it gets "easier" to satisfy the condition. So why not take $A$ to be the scalar multiples of the identity-- then $D$ commutes with all of $A$ on the nose.
Now let $H=\ell^2$ and let $D$ be multiplication by a sequence of real numbers $(d_n)$. If $z\in\mathbb C$ not an accumulation point of the $(d_n)$ then $(zI-D)^{-1}$ exists and is the multiplication operator by the sequence $(z-d_n)^{-1}$. If $d_n\rightarrow\infty$ then $(z-d_n)^{-1}\rightarrow 0$ and so $(zI-D)^{-1}$ is compact and so $D$ has compact resolvant.
Similarly, $e^{-tD^2}$ is the multiplication operator by the sequence $(\exp(-td_n^2))$. This will be trace class if and only if
$$ \sum_n \exp(-td_n^2) < \infty $$
So you just need to let $(d_n)$ grow very slowly. For example, set
$$ d_n = \big( \log(1/e_n) \big)^{1/2} \implies \exp(-td_n^2)
= e_n^{t} $$
where we now just need that $e_n\rightarrow 0$. Let $e_n = 1/2$ for the first $N_2$ terms, then $e_n=1/3$ for next $N_3$ terms, and so on. Then
$$ \sum_n \exp(-td_n^2) = \sum_{k\geq 2} \frac{N_k}{k^t}. $$
Pick $N_k \geq k^k$ so that for any $t>0$ if $K>t$ then
$$ \sum_n \exp(-td_n^2) \geq \sum_{k\geq K} \frac{N_k}{k^t}
\geq \sum_{k\geq K} 1 = \infty. $$
In this example, you could also take $A=c_0$ for a less trivial algebra.