It's possible but you don't want to go there like Andreas is suggesting. Even Alfresco's own (older way) of site permissions is the same. The site_manager, site_collaborator etc. are system groups which Alfresco creates and if you're in one of those groups you'll have your permission within the site.
Oke if you still insist, here is the way to go.
There are 2 repository webscripts to get the Documentlibrary (not counting other ways like search, document-details, etc.)
- alfresco\templates\webscripts\org\alfresco\slingshot\documentlibrary-v2\doclist.get
- alfresco\templates\webscripts\org\alfresco\slingshot\documentlibrary\treenode.get
Open the corresponding .js files (override them). When looping through the items get all the permissionset for the node, then match the permission to the one you need. If it's true go through and if it's false don't add it.
Then again I want to state that this is a heavy operation, so if you have a huge folder collection and you're doing this with like 100 concurrent user, the users won't be happy with the performance.