This is the 12209th most frequent Polish word.
maścią
The Polish word "maścią" means "ointment" or "salve" in the instrumental case.
The word 'maścią' is again in the instrumental case to express the medium/tool employed for treatment.
Złamałem rękę, ale lekarz posmarował ją leczniczą maścią.
I broke my arm, but the doctor applied a medicinal ointment to it.
'maścią' is used in your sentence as a noun, specifically in the instrumental case, to indicate the means by which the sore spot was treated.
Posmarowałem obolałe miejsce maścią.
I applied the ointment to the sore spot.
'maści' here is the genitive singular form of 'maść', used to denote association or description of the smell.