Could be due to any number of things:
Inflammation from irritation (as you already mentioned), urine scald, urinary infection, as well as an indication of more serious conditions. I don't think the pinworms are the cause although it is possible that it might be a histamine reaction to the pinworms dying or tothe medication.
This is a good reminder to everyone that weekly through home exams are extremely important in order to catch problems like this early as Nadia did. Because Nadia caught the inflammation early, she can prevent this from turning into a far more serious infection.
Please let us know what the vet says.