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.
It is not a solution, but an observation in the case where $Z=S^2$.
Assume that $X,Y$ are CW complexes and that $X \vee S^2 \simeq Y \vee S^2 $. So there is a homotopy equivalence $f \colon X \vee S^2 \to Y \vee S^2$. This map induces a map $\hat{f} \colon X\to Y $ which is given by $p \circ f \circ i$ where $i$ is the inclusion of $X\subset X\vee S^2$ and $p$ is the map collapsing $S^2\subset Y\vee S^2$.
Further $f$ gives an isomorphism $$ \tilde{H}_*(X ) \oplus \tilde{H}_*(S^2) \cong \tilde{H}_*(X \vee S^2) \cong \tilde{H}_*(Y \vee S^2) \cong \tilde{H}(Y) \oplus \tilde{H}_*(S^2) .$$
This shows that, in degrees not equal to $2$, the induced map $\hat{f}$ is an isomorphism.
If in addition $H_2(X)$ is finite, then $\hat{f}$ is a homology isomorphism.
Now if we assume that $X$ and $Y$ are simple, then the dual whitehead theorems tell us that $\hat{f}$ is a homotopy equivalence.