Even if there were some friction on the ice, it is still possible to use conservation of momentum to solve this problem, but you would need to impose an additional condition on the problem. What is that additional condition?
Credit: University Physics Volume 1 by OpenStax, openstax.org, licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Exercises adapted: converted to Kosoma's format, maths re-typeset, some exercises split into parts. Source commit db44eb99e9aa1d918fd8cf182f82ccdece9c7b11.