Page has a parent and $post->post_parent returns 0

Try echoing serialized($post); to make sure you’re looking at the right page(s). It should return the post_parent so the problem may be either in the call you’re making to get $post, or double-check that the set of pages did save with a parent page.

Easiest way of doing that is call up “All Pages” and they’ll be indented under the appropriate parent if they’re set up correctly (otherwise opening each one and looking).