Use get_post_ancestors():
// get page ancestors
$parents = get_post_ancestors( $post->ID );
// id of parent page you want to find
$parent_id = 123;
// check of $parent_id
if ( $post->ID == $parent_id || in_array( $parent_id, $parents ) ) {
echo '<a href="#">Link</a>';
}