Curvature of locally conformally-flat manifolds and pull-back metrics. Suppose $(M^n, g)$ is a Riemannian manifold and $\forall p\in M$ there is a nbhd $p \in U$ and a local diffeomorphism $\phi:(U, g|_U) \to (\mathbb{R}^n, \delta)$, where $\delta$ is the flat metric on $\mathbb{R}^n$, such that $g|_U = \phi^{*}\delta$.
Let $R_g$ be the curvature tensor of $g$, then for each $p\in U$ and $X,Y,Z,W \in T_pU$ we have
$R_g(X,Y,Z,W)|_p = R_{\phi^*\delta}(X,Y,Z,W)|_p = (\phi^*R_\delta)(X,Y,Z,W)|_p = R_\delta(\phi_*X,\phi_*Y,\phi_*Z,\phi_*W)|_{\phi(p)} = 0$
because $R_\delta = 0$ since $(\mathbb{R}^n,\delta)$ is flat. This is what I think a locally-flat manifold is, is this logic correct? (As an aside: if we can do this in a nbhd of each point, isn't the whole manifold $M$ flat then?)
Now suppose instead that we have $(M^n,g)$, $p\in U\subset M$, and a local diffeomorphism $\phi:(U, g|_U) \to (\mathbb{R}^n, \delta)$ such that $(e^{2f} g)|_U = \phi^*\delta =:\tilde{g}$ for some positive $f\in C^\infty(U)$. Then the curvature tensor of $\tilde{g}$ satisfies (I don't know how to do the Kulkarni-Nomizu product in latex so I just use wedge)
$R_{\tilde{g}} = e^{2f}(R_{g} - (\nabla^2 f)\wedge g +(df\otimes df)\wedge g - \frac{1}{2}(g\wedge g))$
and by the above, this should still vanish on $U$, right? This is what I think a locally conformally-flat manifold is.
If I have this correct then on $(U, g|_U)$ we should have $Ricci = Scal = 0$ since $R=0$. But now think about the round sphere $(\mathbb{S}^n,\mathring{g})$: it is locally conformally-flat by using the stereographic projection, and the pull-back of $\delta$ is conformal to $\mathring{g}$ so shouldn't $R_{\mathring{g}} = 0$?? Shouldn't it have vanishing Ricci and scalar curvatures too? I know it certainly does not have those tensors vanishing but I can't understand what's going on here.
I'm asking a lot of vague questions and this reflects my real confusion but if I could try to summarize my question it would be: Why doesn't the pullback metric under a conformal diffeomorphism have vanishing curvature tensor? Or does it?
 A: To the aside, "flat" and "locally flat" are often used interchangeably to refer to your definition, but there is also a stronger condition of "global flatness" which requires all holonomy groups to be trivial (or, equivalently, the existence of a parallel global frame). Throughout, I'll talk only about the local case, so every statement need only hold locally.
Note that a metric $g$ has vanishing curvature $R_g=0$ if and only if it is locally the pullback of a Euclidean metric in the manner you describe. Either of this could serve as the definition of flatness, but I'll use only the former condition for simplicity.
By definition, a metric $g$ is conformally flat if there exists a conformally related metric $\tilde{g}=e^{2f}g$ with $R_{\tilde g}=0$. This does not mean that $R_g=0$, since conformally related metrics do not have the same Riemann curvature. The Ricci and scalar curvature will also differ in general (see here), but the Weyl tensor will be the same.
Using the example of the stereographic projection $\sigma:S^n\setminus\{p\}\to\mathbb{R}^n$, we have the round metric $\mathring{g}$ and the pullback of the Euclidean metric $\widetilde{g}=\sigma^*\delta$ on $S^n\setminus\{p\}$, which are conformally related. The pullback metric has vanishing curvature $R_{\widetilde{g}}=0$, but the round metric has curvature $\mathring{R}_{abcd}=\mathring{g}_{ac}\mathring{g}_{bd}-\mathring{g}_{ad}\mathring{g}_{bc}$
