What do you call a formal (or, perhaps, informal) endorsement of a person, not currently employed by some company, by a current employee of that company? For some reason, I thought it's called a "referral", but I checked a few dictionaries, and it no longer seems so to me
The word you are looking for is reference.
a letter that is written by someone who knows you, to describe you and say if you are suitable for a job, course, etc.:
"My old headteacher said he would write/give me a glowing (= very good) reference."
Referral, on the other hand, is
the act of directing someone to a different place or person for information, help, or action often to a person or group with more knowledge or power:
"The doctor gave him a referral to (= arranged for him to see) the consultant."
Recommendation could be a generic term, but is not the one commonly used in the job market.
The thing about a 'reference' is it is not guaranteed to be positive, but can often be a formal/compulsory requirement in order to secure a new job.
If the person being suggested for a position is known to the employee, you might call them a recommendation or a referral.
Although both these words refer to the act of making such a suggestion, it is common to use these to refer to the person being recommended or referred.
- I made a recommendation of [name].
- [Name] was a recommendation.#
Webster's dictionary makes the same distinction:
1 : the act, action, or an instance of referring gave the patient a referral to a specialist
2 : one that is referred