[Source criticism](https://biblicalstudies.org.uk/pdf/nt-interpretation/nti_8_source-criticism_wenham.pdf) may shed some light on this question. If the [documentary hypothesis](https://research.auctr.edu/c.php?g=940254&p=6776326) is correct, then [Numbers](https://www.newworldencyclopedia.org/entry/Numbers,_Book_of) was written long after the story of Samson occurred.  

This begs the question as to whether Samson could have known the Nazirite rules as expressed in Numbers. Of course the Nazirite tradition could have predated Numbers, but if so, we don't know much about what it entailed. From this perspective we might want to consider Samson's story as representing a developmental stage in the Nazirite laws that eventually found expression in Numbers, centuries after the story takes place. 

So no, the rules in Numbers don't necessarily apply to Samson, but Samson's story may have contributed to the rules in Numbers.