Add html to li for active-trail menu links
You can check if $element['#localized_options']['attributes']['class'] contain active-trail class and create your custom span based on this information.

function MYTHEMENAME_menu_link(array $variables) {
  $element = $variables['element'];
  $sub_menu = '';
  $span = '';

  if ($element['#below']) {
    $sub_menu = drupal_render($element['#below']);
  }

  if (isset($element['#localized_options']['attributes']['class'])) {
    if (in_array('active-trail', $element['#localized_options']['attributes']['class'])) {
      $span = '&lt;span&gt;Something&lt;/span&gt;';
    }
  }

  $output = l($element['#title'], $element['#href'], $element['#localized_options']);
  return '&lt;li' . drupal_attributes($element['#attributes']) . '&gt;' . $output . $sub_menu . $span . "&lt;/li&gt;\n";
}