No, Windows does not allow you to set passwords that limit access to shared folders. However, if you are not on a domain, you can limit network access to the Public folder by turning password-protected sharing on or off. This allows only people with a user account and password for your computer to access the Public folder over the network.
Whether you are on a domain or not, you can limit access to other folders by choosing to share only with specific people, granting them sharing permissions. Permissions can be granted to an individual or to a group of users on the same network, allowing them to access your shared folders. You can also set the level of access, allowing people to just open shared files, or also to change, create, or delete them. For more information, see Share files with someone.