If actor John Gavin become the next U.S. ambassador to Mexico, he is likely to be recognized by the man in the street, but not in his diplomatic capacity.

Gavin, 48, a longtime friend to President Reagan, is the suave, swarthy figure who for the last four years has been flashing onto Mexican television screens advertising Bacardi rum.

In the glamorous ad, which runs almost daily on commercial stations, Gavin, dressed in a tuxedo, encourages the audience to take the "age test," pouring two snifters of rum, emptying them and a few minutes later sniffing the aroma he says is left by the better, more mature brand.

Anxious to end Gavin's identification here with liquor sales, his agent reportedly has requested that the advertisement be taken off the air. But in response to press inquiries, a representative from the agency handling the advertising replied that the commercial was not only bould by a contract but also might be "put on more often" and become more effective, given the actor's new fame.

The reports of Gavin's nomination, which is expected to be officially announced soon, has clearly stunned Mexican officialdom.

Knowing little of Gavin's earlier career, some officials dismissed the first press report as a joke. Others privately bemoaned it as a slight to Mexico, a country with which the Reagan administration has said relations are important.

But one experienced diplomat here pointed out that a personal friend of Reagan's, however inexperienced, would "probably be able to pick up the phone and call the White House," an advantage that Mexicans "who understand and prefer personalized politics may come to appreciate."

Gavin, who graduated from Stanford University after studying Latin American affairs, was president of the Screen Actors Guild from 1971 to 1973, a post Reagan also held. From 1961 to 1965 he was special assistant for cultural exchange to the secretary general of the Organization of American States.

His mother was born in Mexico, and the actor is known to be fluent in Spanish.

He would replace Julian Nava, another Californian of Mexican ancestry, who was appointed by Jimmy Carter to serve here. Nava, a history professor, was the first Mexican American to hold the post.

Testifying to the fame of the rum advertisement and of the handsome male appearing in it, the reports of Gavin's nomination have produced a barrage of comment in the news media, ranging from indignation to mockery.

One commentator talked of Washington's "diplomatic sadism." Another said that if Mexico was to get an American movie star, "we Mexicans would rather have Wonder Woman."

Mexico's cartoonists, who are always quick to enjoy a squabble with their powerful northern neighbor, have had a field day, suggesting names of Mexican actors to be sent to Washington and playing about with the theme of the rum advertisement.