See https://developer.wordpress.org/reference/functions/get_ancestors/
$ancestors = get_ancestors($post_id); // supply correct post ID
$gp_id = 0;
if (is_array($ancestors) && count($ancestors) >=2) {
// has grandparent
$gp_id = $ancestors[1];
}
if ($gp_id) {
$value = get_field('field-name', $gp_id);
}