Get Entity from Path or Url Object Retrieved from Menu (Node or Page)
I managed to come up with a solution by using the storage manager to load the entity using the path to load it.

$page = \Drupal::entityTypeManager()
  -&gt;getStorage('page')
  -&gt;loadByProperties(array(
      'path' =&gt; $path
  ));


I'm assuming you can use the same method for nodes.