Before starting my question, let me define a couple terms to avoid the confusion that usually accompanies this topic:
I define the $c$-number valued energy-momentum tensor as $T^{\mu\nu} = \frac{2}{\sqrt{g}}\frac{\delta S}{\delta g_{\mu\nu}}$. The corresponding quantum operator $\hat{T}^{\mu\nu}$ is then defined as usual, by inserting $T^{\mu\nu}$ into the path integral (in this question I won't worry about contact terms). Finally I define $T=T^\mu_\mu$ and likewise for the corresponding operator.
I define "conformally invariant" to mean that the action $S$ is invariant under the $SO(d,2)$ group of conformal transformations of flat space. Note: I do not use "conformal invariance" to mean Weyl invariance (i.e. symmetry under $g_{\mu\nu}\to\Omega^2 g_{\mu\nu}$ for arbitrary $\Omega(x)$), even though many texts sloppily do so.
Now, my question concerns a conformally invariant QFT on flat space. I've seen contradictory statements regarding the implication "if a QFT on flat space has conformal invariance, then its energy-momentum tensor is traceless at the quantum level" (again, here I don't care about contact terms).
Statement A: In this answer, it is stated that all we can say about $\hat{T}$ is that it satisfies $\int \hat{T} = 0$ and $\int x^\mu \hat{T} = 0$. In particular, this is not enough to conclude $\hat{T}= 0$.
Statement B: The trace anomaly equation says that for any state, $\langle \hat{T} \rangle$ is the sum of curvature invariants. Therefore $\langle \hat{T} \rangle = 0$ on flat space. Since this holds for any state, $\hat{T}=0$.
Clearly A and B are in contradiction. Which one is correct? Is it true that $\hat{T}=0$ on flat space (up to contact terms) - and if so, how does one prove it?
Note: please do not assume Weyl invariance in your answer. It is easy to show that Weyl-invariance implies $\hat{T}=0$. My question is about whether conformal invariance alone implies $\hat{T}=0$.