I think you need to loop the $menu_items
because the function, according to the Codex, returns a array.
Remplace echo $menu_items->ID;
with
foreach ( $menu_items as $menu_item ) {
echo $menu_item->ID;
}
I need to check the array exactly, but if you need to compare a post ID to a menu item, you will need to compare $menu_item->object_id
which contains the ID of the post the menu-item is linking to.