MODULE_preprocess_block() get rendered region in drupal 8
So, getting everything working here is the code I got to work.

use Drupal\block\Entity\Block;
/**
 * Implements hook_preprocess_block().
 */
function harfang_preprocess_block(&amp;$variables) {
  $block = Block::load($variables['elements']['#id']);
  $region = $block-&gt;getRegion();

 // Add classes to all bocks in footer region.
  if($region == 'footer') {
 // Do something.
  }
}


added the use statement at the top and removed the non-joiners