You can do either. You can password protect a single file, a single directory, or a whole domain or subdomain.
I haven't used the htaccess feature in the Web Panel, but I've heard that it does exactly what you want. Have you tried it out yet?
Use the [color=#CC0000]3DOM50[/color] promo code for 3 extra lifetime domains and $50 off
More Dreamhost coupons here!