The prefix you're likely thinking of is "ap" which is actually a shortened form of the Welsh word "ap" meaning "son of".
It is often used in Welsh surnames, for example:
* Ap Rhys means "son of Rhys"
* Ap Owen means "son of Owen"
* Ap Thomas means "son of Thomas"
It's important to note that the prefix "ap" is only used for male ancestors. For female ancestors, the prefix "ferch" (meaning "daughter of") is used.