Add an attribute to a specific tag in text body of page
Since you are just looking to add an attribute to a tag, you could do your changes to the field #markup instead. A simple example:

/**
 * Implements template_preprocess_field().
 */
function MYTHEME_preprocess_field(&amp;$variables) {
  if ($variables['element']['#field_name'] == 'body') {
    $markup = preg_replace('/href=/', 'title="foo" href=', $variables['items']['0']['#markup']);
    $variables['items']['0']['#markup'] = $markup;
  }
}