Connected sum is not cancellative

Statement
The connected sum of manifolds operation is not cancellative in any sense (up to homotopy, up to homeomorphism, up to diffeomorphism, etc.) Specifically, there is a natural number $$n$$ such that we can find $$n$$-dimensional compact connected manifolds $$A,B,C$$ such that $$A \# B$$ and $$A \# C$$ are homeomorphic (in fact, diffeomorphic if we put a differential structure) but $$B$$ and $$C$$ are not homeomorphic or even homotopy-equivalent.

The case of $$n = 2$$
Here, we set $$A$$ as the real projective plane $$\mathbb{P}^2(\R)$$, $$B$$ as the Klein bottle, and $$C$$ as the 2-torus. Both $$A \# B$$ and $$A \# C$$ are homeomorphic to what's called Dyck's surface (by a result called Dyck's theorem). However, the Klein bottle and the 2-torus and not homeomorphic -- the former is non-orientable (and hence its second homology group vanishes) and the latter is orientable (and hence its second homology group is $$\mathbb{Z}$$).