I did some experimenting tonight, and it appears that, no, the DIR-505 does not act as a SMB or AFP server. It does have a DLNA server but that's a far cry from what you're looking for. You can access files on an attached device using the Shareport app or the web interface to that, but you can't map a drive.
If you want something that can be an SMB server (not AFP as far as I know), look at
CloudFTP. It is NOT a router, but can operate in Ad Hoc mode to wirelessly serve a USB disk, or can join an existing network. I have one and have used it as an SMB server (also DLNA). (On the site I linked you will see references to both CloudFTP and iUSBport - these are the same product.) Like the DIR-505, the CloudFTP has its quirks but I'm mostly happy with it as a solution to certain problems.