Not even Windows allows password protecting folders. There are however alternative approaches which I feel will give you what you need and some of which have been mentioned by others here.
Firstly, the 'normal' approach both for Mac and Windows when accessing files from a server and your 'router' counts as a server here is to set 'permissions' defining which users are allowed to access it. Furthermore those user accounts would also have passwords assigned to them, you would then 'login' to the file server, enter a user name and password and only get access to the files and folders that that username has permission to access, any other user not allowed via the permissions would not be able to access those files and folders.
An alternative way as already suggested by macjack is to create a 'disk image' this is a special type of file that acts as a virtual disk. In order to see the contents of this 'virtual' disk you have to open it and in this case a password would be set so that you first have to enter the correct password before it is opened. A similar approach can be done on Windows using password protected ZIP files.
The program 'Disk Utility' in the Mac's 'Utilities' folder which is inside the 'Applications' folder can be used to create a new empty and password protected disk image.