By Rabbi Yosef Braun, member of Badatz Crown Heights
One of the prominent poskim of the past generation, R’ Dov Berish Weidenfeld, who was the Tshebiner Rav and author of Dovev Meisharim, ruled that freezing water to make ice cubes on Shabbos is not permitted due to the prohibition of molid (creating a new entity), or nolad (benefitting from something that came into existence on Shabbos).
Other poskim argue that it might be similar to the melachah of boneh (using existing ingredients to construct something).
However, the majority of poskim rejected both these positions, and ruled that making ice cubes on Shabbos is permitted, provided they are intended for use on Shabbos.
In a case where there is a tzorech (need), there is even more room for leniency, as Shulchan Aruch tends to be lenient regarding similar aspects of nolad on Shabbos and Yom Tov if there is a tzorech.