The question only requires regarding K$_0$ as an abelian group (it has a natural pre-ordering too), which makes it easy to construct simple (in the technical sense) examples.
Let $A$ be a simple infinite dimensional unital AF C*-algebra, whose K$_0$ group is free (as an abelian group) [lots of examples exist; see any basic work on AF algebras]. If $B$ is a unital subalgebra, it is stably finite (as $A$ is stably finite). Hence the image of $K_0(B)$ in $K_0(A)$ is nonzero (actually, we knew this anyway, since the free module on one generator over $B$ has nonzero image in K$_0(A)$). The image of K$_0(B)$ is a nonzero subgroup of the free abelian group K$_0(A)$, so is itself free, and thus the map to its image splits. So $\bf Z$ is a direct summand of $K_0(B)$. [Even though $K_0(B) \to K_0(A)$ need not be one to one!]
And a simple infinite-dimensional C*-algebra is not Morita equivalent to a commutative one.