Let $X,Y,Z$ be finite pointed CW complexes. Is it possible that $X\vee Z$ and $Y\vee Z$ are homotopy equivalent, but $X$ and $Y$ are not?
Remark 1: Without the finiteness assumption on $Z$, there are silly examples like $X=pt$ , $Y$ some non-contractible complex and $Z$ a wedge of infinitely many copies of $Y$. If we only assume $Z$ is finite, this is still not trivial to me, but less interesting.
Remark 2: (Edit: there is a mistake in quotation here. We actually need $G$ and $H$ to be finite). By Van Kampen, we have $\pi_1(X\vee Z)\simeq \pi_1(X)*\pi_1(Z)$ where $*$ denotes the free sum of groups. As proved (very elegantly) here, for finitely generated groups it is true that $G*K\simeq H*K$ implies $G\simeq H$. Hence, one can't use $\pi_1$ to distinguish between $X$ and $Y$ in such a case.
Remark 3: One can exclude silly examples by imposing other finitness conditions on $X,Y$ and $Z$. For example, that they are $\pi$-finite (have finitely many non-trivial homotopy groups all of which are finite).
Having said that, I am mainly interested in the case where $Z=S^2$, but all kinds of examples and/or observations about the problem are welcome.