You wish to password protect a subdirectory with a .htpassword and .htaccess, but you have WordPress installed in the root with permalinks enabled. The solution is simple.
- Create a new file in the subdirectory (public_html/path/to/) and name it onerror.html
- Edit the root .htaccess where the modrewrite rules are for wordpress. Add the following line to the very top of the file and save.
ErrorDocument 401 /path/to/onerror.html
Now it's fixed.