Basically the icon attribute points to a css-class. So if you want to use custom icons you need to create a custom css-class. For example:
CSS-Class:
.customIcon {
background: transparent url("#{resource['ivy-cms:Images/customIconImage']}") no-repeat top !important;
}
Your code:
[...]<p:treeNode icon="customIcon">[...]
The CSS-class will now reference a file that is within the CMS-Folder Images/ and point to an image with name customIconImage (doesn't matter what format). Yo You can also set the width and height within the CSS-class to control the size of the icon via CSS, although this is not recommended because this takes up bandwith when the original sized icon is loaded and afterwards resized.
Hope this helps.