Here is the code to put into the sidebar that will list, if the page or its parent has children.
post_parent) {
// there is a parent, so
$sTitle = get_the_title($post->post_parent);
$theLink = get_permalink($post->post_parent);
$children = wp_list_pages('sort_column=menu_order&title_li=&child_of='.$post->post_parent.'&echo=0');
} else {
$sTitle = get_the_title($post->ID);
$theLink = get_permalink($post->ID);
$children = wp_list_pages('sort_column=menu_order&title_li=&child_of='.$post->ID.'&echo=0');
}
if ($children) {
?>