Given $A$ is an $C^{*}$-algebra, is there any examples that a dense subalgebra $D$ contained in an twosided, self-adjoint, non-trivial ideal $I$, while $D$ is not an ideal in $A$? In other words, I am looking for examples of dense subalgebra that is not dense ideal in $C^{*}$-algebras.
I know that if we remove "non-trivial" from the conditions, then $\mathbb{C}$ is an example. Since all rational complex numbers form a dense subalgebra, but it is not an ideal.
Edit
$D$ is dense in $A$, not in $I$.
We have $$C_c^\infty(\mathbb R)\subset C_c(\mathbb R)\lhd C_0(\mathbb R)$$ where $C_c^\infty(\mathbb R)$ denotes the algebra of smooth functions on $\mathbb R$ with compact support, $C_c(\mathbb R)$ denotes the algebra of continuous functions on $\mathbb R$ with compact support, and $C_0(\mathbb R)$ is the $C^*$-algebra of continuous functions on $\mathbb R$ that vanish at infinity.