I don't quite understand what you're trying to do.
Do you want to select a folder on your local computer and store the path to that folder?
Or do you want to be able to select a folder on the server (from the assets folder)?
I tried it by including this in my pages getCMSfields
$fields->addFieldToTab("Root.Content.Banner", new TreeDropdownField("FolderForBanner", "Choose a folder to get the images for the slideshow from", "Folder"));
It seems to work.
But I don't know how to use the selected path in the .ss Page.
If I just put $FolderForBanner in the ss file, it obviously cannot work.
How to turn this "path object" into a string?
Actually that is completely unnecessary. You can just access a $has_one relationship in your template by using $HasOneName. You then can do $HasOneName.URL or $HasOneName.RelativePath or whatever in your template.