Does prematurity affect final adult height?

Maybe/maybe not. Prematurity is a broad category with survivors occasionally as early as 24 weeks up to more common 36-37. The smaller/earlier the baby the more likely they had or have predisposing factors that may limit final height. The less time in the neonatal ICU and less complications with their care, the less it will alter achieving their genetic potential.
It may . If child is born small for gestational age (sga), there is a risk of premature puberty (particularly girls) which in turn can compromise final adult height. Good question !