Does a bedroom have to have a closet?
I was curious so I just did some googling around and it seems that, if anything, some lenders might require a closet for a room to be included in the bedroom count for the house. I imagine this might be to help ensure consistency in home valuations. Check the first few results here for more info.

Code does require a bedroom have an egress window however.  Also if your house is on a septic system it will be approved for a certain number of bedrooms and you may run into issues when selling the house if you've represented the new room as a bedroom but your septic system isn't rated for it.