canada
In contrast to Trish's answer (I don't know what jurisdiction that applies in), the law in Canada leaves open the possibility that the circumstance you describe could make out a successful defamation claim.
The elements of defamation are (Grant v. Torstar Corp., 2009 SCC 61, para. 28):
(1) that the impugned words were defamatory, in the sense that they would tend to lower the plaintiff’s reputation in the eyes of a reasonable person; (2) that the words in fact referred to the plaintiff; and (3) that the words were published, meaning that they were communicated to at least one person other than the plaintiff.
But, whether the impugned words were defamatory and whether the words in fact referred to the plaintiff can only be determined in context by a finder of fact. Whether a person to which the statement was published would reasonably understand the statement to be a defamatory statement about another company is judged based on the full context of the statement. Defamation need not be literal; it can be inferential or based on inuendo.
Where a claim is based on the inferential meaning of words, the question is one of impression: what would the ordinary person infer from the words in the context in which they were used? Both literal and inferential defamatory meaning reside within the words, as part of their natural and ordinary meaning. In contrast, where legal innuendo is pleaded the impugned words take on defamatory meaning from outside circumstances beyond general knowledge, but known to the recipient.
Weaver v. Corcoran, 2017 BCCA 160 at para 72
See also R.E. Brown, The Law of Defamation in Canada, 2nd ed. (1999), quoted in S.G. v. J.C. (2001), 56 O.R. (3d) 215:
Therefore, in order to recover, the plaintiff must plead and prove that he or she is the one to whom the defamatory statement refers, that is, it must be shown to have been published 'of and concerning' the plaintiff. The defamatory publication 'must refer to some ascertained or ascertainable person, and that person must be the plaintiff.' It must refer to or concern him personally. The test in every case is whether the ordinary sensible person to whom the words were published would understand them as referring to the plaintiff.
It is not necessary that the plaintiff be identified by his or her proper name, or even mentioned at all, if it is otherwise shown that the words would be reasonably understood to refer to the plaintiff. He or she may be referred to in the guise of some fictional or historical character or by a play on words. It may be clear from other evidence that he was the one alluded to, but he must satisfy the court in that regard. This may be done by introducing evidence, apart from the publication, connecting the plaintiff with the defamatory publication. The question in such a case is whether or not the words used are such as to lead an ordinary sensible person, or reasonable persons, who pay reasonable attention to the contents of the communication, to understand that it was the plaintiff to whom the defendant referred.
The test of whether words that do not specifically name the plaintiff refer to him or not is this: Are they such as reasonably in the circumstances would lead persons acquainted with the plaintiff to believe that he was the person referred to? That does not assume that those persons who read the words know all the circumstances or all the relevant facts. But although the plaintiff is not named in words, he may, nevertheless, be described so as to be recognized; and whether that description takes the form of a word-picture of an individual or the form of a reference to a class of persons of which he is or is believed to be a member, or any other form, if in the circumstances the description is such that a person hearing or reading the alleged libel would reasonably believe that the plaintiff was referred to, that is a sufficient reference to him.