There is a difference and it is not so small.
「[苗字]{みょうじ}」 is the word we use to refer to one's family name (as opposed to one's given name) in our everyday life.
In saying things like "What's your family name?", "I only know his family name: I forgot his given name.", "She has the same family name as I do.", everyone will use 「苗字」. No one would use 「[家名]{かめい}」 to say these.
「家名」 is a much bigger and nuanced word than 「苗字」. Any toddler would know what 「苗字」 means even though 「[上]{うえ}の[名前]{なまえ}」 might be the term that toddlers actively use.
「家名」 refers more to the family reputation and/or family honor than to just the family name itself.
We say 「家名を[汚]{けが}す」 to mean "to bring disgrace on one's family". You would sound pretty funny (and uneducated) if you said 「苗字を汚す」.