Based on a sample of 1.31×109 J/ψ events collected with the BESIII detector, an amplitude analysis of the isospin-violating decays η′→π+π-π0 and η′→π0π0π0 is performed. A significant P-wave contribution from η′→ρ±π is observed for the first time in η′→π+π-π0. The branching fraction is determined to be B(η′→ρ±π)=(7.44±0.60±1.26±1.84)×10-4, where the first uncertainty is statistical, the second systematic, and the third model dependent. In addition to the nonresonant S-wave component, there is a significant σ meson component. The branching fractions of the combined S-wave components are determined to be B(η′→π+π-π0)S=(37.63±0.77±2.22±4.48)×10-4 and B(η′→π0π0π0)=(35.22±0.82±2.54)×10-4, respectively. The latter one is consistent with previous BESIII measurements.