I think you could do this with a bit of a workaround, though it wouldn't have any effect in world generation and you might get a bit of weirdness with new migrants where they would be vulnerable to being transformed until they had been at your fortress for the set amount of "vulnerable" time (so if your interaction only effected dwarves for the first year of their life then migrants would be vulnerable for the first year). Also any traders or liasons would be vulnerable as well.
Basically what you do is give dwarves a dwarf targeting interaction with zero cooldown. This interaction does 2 things:
1)It instantly applies a harmless syndrome with a class called VULNERABLE.
2)After the period of time you want them to be vulnerable (say a year) the first syndrome wears off and a second harmless syndrome with a class called IMMUNE is applied permanently.
This interaction cannot target creatures that have either the VULNERABLE or IMMUNE syndromes, to stop dwarves from spamming the interaction.
Have your "ghoul conversion" reaction be unable to target creatures with the IMMUNE syndrome class. (You will want this interaction to either have a low chance of triggering, or to have a rare frequency so that all of your dwarves aren't turned into ghouls in their window of vulnerability.)