With regard to his actions, Ibn Mas’ood (may Allaah be pleased with him) said: “The Prophet (peace and blessings of Allaah be upon him) went out to answer the call of nature and asked me to bring him three stones. I found two stones and searched for a third but could not find one. So I took a piece of dried dung and brought it to him. He took the two stones and threw away the dung and said, ‘This is a filthy thing.’”
The hadeeth of Abu Hurayrah, which states that he gathered some stones for the Prophet (peace and blessings of Allaah be upon him) and brought them to him in his garment, put them down next to him then went away (narrated by al-Bukhaari, 154) indicates that istijmaar (using stones to cleanse oneself after relieving oneself) is permissible. I do not know of any report to this effect from the Prophet (peace and blessings of Allaah be upon him), but there is no doubt that this is more effective in cleaning.