Adding Filter to Homepage only

Even if wrap your filter in a if statement, the function still will be executed. Try this:

global $current_class;
$current_class="flex-container";

function rt_oddeven_post_class ( $classes ) {
  if ( is_home() || is_front_page() ) {     
    global $current_class;
    $classes[] = $current_class;
    $current_class = ($current_class == 'flex-container') ? 'flex-container-reverse' : 'flex-container';
    return $classes;
  }
}


add_filter ( 'post_class' , 'rt_oddeven_post_class' );