It is easy to see that if $A\times B$ is homeomorphic to $A\times C$ for topological spaces $A$, $B$, $C$, then one may not conclude that $B$ and $C$ are homeomorphic (for example, take $C=B^2$, $A=B^∞$). The question is: for which $A$ such conclusion is true?
Witold Rosicki has a lot of results of this sort (usually under some conditions on $B$ and $C$). For instance,
On decomposition of polyhedra into a Cartesian product of 1-dimensional and 2-dimensional factors
On uniqueness of decomposition of 4-polyhedron into Cartesian product of the 2-dimensional factors
On uniqueness of Cartesian products of surfaces with boundary (with J. Malešič, D. Repovš, A. Zastrow)
There also exist papers of a different flavor on this subject
All lens spaces have diffeomorphic squares (S. Kwasik, R. Schultz)
Non-cancellation and a related phenomenon for the lens spaces (A. J. Sieradski)
As for nice examples, there exist manifolds $M$ such that $M\times I$ is homeomorphic a ball. For instance, Mazur's 4-manifold, as described by Zeeman:
Start with $S^1\times I^3$. In the boundary $S^1\times S^2$, choose a knotted $S^1$ homologous to the first factor. Knotted means that $S^1$ is not isotopic to a 1-sphere $S^1\times y$, $y\in S^2$. Form $M^4$ from $S^1\times I^3$ by attaching a handle to $S^1$ (i.e., attach a disk to $S^1$ and then fatten the disk so that its fattened boundary is identified with some chosen tubular neighbourhood of $S^1$ in $S^1\times S^2$). Form the cube $I^4$ by the same process, only omitting the knotting. The knotting ensures that $M^4\ne I^4$. But one extra dimension permits unknotting $M^4\times I=I^4\times I$ (by just untwisting the handle).
Zeeman also notes a parallel construction of Whitehead's example with surfaces $\times I$ (mentioned above by Sergei Ivanov): `Start with $S^0\times I^2$. In the boundary $S^0 \times S^1$, choose three linked $S^0$'s, each homologous to the first factor', etc.