Stably isomorphic groups The original question is: For groups, $A$, $B$, and $C$, can we have $A$ and $B$ be nonisomorphic but still have $A\oplus C = B\oplus C$?
Clearly the answer is yes; for example, we can take $A=D$, $B=D\oplus D$, and $C=\oplus_\mathbb{N} D$.  A spicier example is when $A$ and $B$ are the groups of sections of vector bundles over the same base space that are stably isomorphic but not isomorphic.  But in general, both of these are going to involve non-finitely generated groups.  So perhaps we should restrict the question to finite groups.  Or we could even ask: Exactly what conditions on the groups give positive and negative answers?
Edit: To clarify what sorts of answers I'm hoping exist, recall that the definition of stable isomorphism of vector bundles requires that you add trivial bundles.  So, what should be the algebraic analogue?
 A: Your question is a bit vague as it stands, I think. One way to read it is: what conditions on a group guarantee that it can be cancelled in a direct product?
[R. Hirshon, On Cancellation in Groups, The American Mathematical Monthly, Vol. 76, No. 9 (Nov., 1969), pp. 1037-1039] proves that finite groups are cancellable. In other words, that if $G$ is a finite group and $A$ and $B$ are groups such that $A\times G$ is isomorphic to $B\times G$, then $A$ is in fact isomorphic to $B$.
In the paper, Hirshon observes that exactly the same argument given for finite groups can be used to show that groups with a (finite) principal series can be cancelled. He gives an example to show that an infinite cyclic group cannot be cancelled.
(A principal series in a group $G$ is a chain $$G=H_0\supsetneq H_1\supsetneq H_2\supsetneq\cdots\supsetneq H_k=(e)$$ such that each $i\in\{1,\dots,k\}$ the subgroup $H_i$ is maximal among the normal subgroups of $H_{i-1}$. One can check easily that a group has a principal series iff it satisfies both the ascending and the descending conditions on normal subgroups)
