New York State has a law where anybody 18 and over can rent a car, this applies to NYC as well.
However if you are under 21 the underage surcharge/fees are quite ridiculous, $80 a day or so.
Under 25 the fees are less ridiculous, but still a lot, $25-40 a day.
One suggestion is Hertz has this thing where they waive the underage fee for people under 25 (not under 21), go to their website, and it should be a special somewhere.