Just use the break
statement to abort after the first cat that is found and that is a child category.
foreach ( get_the_category() as $cat )
{
if ( cat_is_ancestor_of( 10, $cat ) )
{
printf(
'<a href="https://wordpress.stackexchange.com/questions/103533/%s">%s</a>',
get_category_link( $cat->cat_ID),
echo $cat->cat_name
);
break;
}
}