An 18-year-old has capped off his birthday celebrations with a criminal charge after he allegedly doused an ambulance in petrol when emergency service workers were called to his party to extinguish a bonfire and treat a teenager for burns.

Volunteer firefighters from the NSW Rural Fire Service were forced to call for police back-up on Saturday night when revellers became aggressive and tried to obstruct efforts to extinguish a bonfire at the property in Rossmore near Kemps Creek on the outskirts of Sydney, police said.

A 14-year-old boy was treated for burns to his face and taken to Westmead Children's Hospital, where he is in a stable condition.

Police said emergency service workers were called to the house party following reports the boy had fallen into the bonfire. Subsequent reports have suggested the teenager was burned on the face after he threw petrol onto the blaze.