I think you can. Technically, it should just be a matter of configuring whatever firewall you use, which can be straightforward or dauntingly hard to figure out.
If the visitors to your personal web server aren't going to be in your local network, there is also the matter of legality, since some ISPs say, in the fine print of the contract you "agreed to", that you won't run any servers. There is very little chance, however, that they would give you any trouble as long as you aren't running a service that uses a noticable amount of bandwidth. A web server for friends to access shouldn't be a problem.