Is it safe for me to use _taxonomy_title_get_title() implemented by a third-party module? I have installed the Taxonomy Title module 7.x-1.5 in order to change the grey content title on top of certain taxonomy pages. The module added a new field (Term page heading) where I add my custom titles. The title is changed as expected. Now I also need to use that same custom title in certain nodes, so I need to find out how to get the value added in that field. 

After a look at the module code, I tried using _taxonomy_title_get_title($tid), which works. Is it safe for me to use this function?
Drupal adds a underscore to its function to mean they are for internal use only, and modules/themes should not depend upon them. For example, in Drupal 8, the theme() function was renamed _theme() as reported in theme() renamed to _theme() and should not be called directly, which also states:


  It has been renamed to _theme() and is for internal use only.


Then, it was removed.

Third-party modules follows the same naming convention: If the function name starts with an underscore, they don't want they use that function. This doesn't mean the function is necessarily going to be removed, but the maintainers could remove it at any time, even passing from version 7.x-1.5 to version 7.x-1.6.

So, if by safe you mean sure that the code I am writing will not need any change, then I would say no.
You could eventually write your own code that uses just safe functions made available from that module, using _taxonomy_title_get_title() as starting point; otherwise, you need to check your code is still working when updating that module. Depending on your specific use, you could also use tokens; the module defines [term:title] which is set using the function you are calling.

/**
 * Implements hook_tokens().
 */
function taxonomy_title_tokens($type, $tokens, array $data = array(), array $options = array()) {
  $replacements = array();
  $sanitize = !empty($options['sanitize']);

  if ($type == 'term' &amp;&amp; !empty($data['term'])) {
    $term = $data['term'];

    foreach ($tokens as $name =&gt; $original) {
      switch ($name) {
        case 'title':
          $title = _taxonomy_title_get_title($term-&gt;tid);
          if ($title) {
            $replacements[$original] = ($sanitize) ? check_plain($title) : $title;
          }
          else {
            $replacements[$original] = $term-&gt;name;
          }
          break;
      }
    }
  }

  return $replacements;
}


See also Call to undefined function _taxonomy_title_get_title(); it is for the version 6.x of the module, but users are essentially saying that, passing from version 6x-1.3 to 6.x-1.4/6.x-1.5, they get an error about the function _taxonomy_title_get_title() being not defined. (In fact, it was renamed _taxonomy_title_get().) Since the development snapshot doesn't call _taxonomy_title_get_title(), I get they are talking of other code.