It is possible, but how you'll need to do it depends on what you're using to serve your Subversion repositories; Subversion itself specifies no method of access control, and leaves such concerns up to whatever software you're using to expose your repository to your clients.
(This is actually preferable to doing access control within Subversion proper, because it's more modular and thus more easily extensible; a Subversion repository served via Apache can partake of any access control method Apache supports, instead of having to reimplement each such method as part of the Subversion source tree.)
If you're serving your repository via Apache or via the svnserve
tool packaged with the Subversion distribution, you can find details on how to configure access control in Chapter 6 of Version Control with Subversion, available free online. Otherwise, consult the documentation for your server software for further details on how to set up the access control options you require.
A final note: the PHP and Ruby APIs you describe are implementations of a Subversion client, which will almost certainly be useful in developing your application code, but which will not do anything to help you work with server-side access control. For that, you'll need to find some way of either safely allowing your application code to modify the configuration of your repository server (dicey), or of having your application integrate with an authentication/authorization database which the repository server uses to find out who's allowed to go where in the repo and do what.