All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad, sallallahu ‘alayhi wa sallam, is His slave and Messenger.
You are not obliged to do any of that; the family name does not have to be the name of a particular forefather. The person may be attributed to any of his fathers (ascendants) of all degrees, up or down to all levels. Allah, The Exalted, says (what means): {Call them by (the names of) their fathers; it is more just in the sight of Allah.} [Quran 33:5]
Moreover, it has been authentically reported that the Prophet, sallallahu ‘alayhi wa sallam, said, "I am the Prophet of Allah; undoubtedly, I am the son of ‘Abd Al-Muttalib." [Al-Bukhari and Muslim] He, sallallahu ‘alayhi wa sallam, attributed himself to his grandfather.
Allah knows best.