How to get post’s current parent term ID?

If you just need IDs, get_ancestors will return an array of parents for any type of object:

$term_id = 21;
$ancestors = get_ancestors( $term_id, 'location' );