Yes is possible set a password to a subfolder,
but just online. not locally.
Go to the OneDrive website and sign in to your account.
- Navigate to the folder that you want to protect with a password.
- Right-click on the folder and select "Share".
- In the "Share" dialog box, select the "Specific people" option.
- Click on the "Send" button to generate a link to the folder.
- In the "Link settings" dialog box, enable the "Set password" option and enter a password for the link.
- Click on the "Apply" button to save the password-protected link.
Regards