I don't think it's as simple as that - "the apple is red" is "single thing belongs to category", whereas "Olaf Scholz was the ninth Chancellor of Germany" is "single thing is single thing" - the latter is reversible, the former is not. I would expect a good language model to be able to parse both sentences correctly.
You are right. You are thinking correctly. But "the apple is red" might not mean that this particular apple belongs ---to put it in your wording--- to the category red, but that the category of things we call apple also belongs to the category of things that are red. And generally speaking, I think that is the meaning.
I don't disagree though perhaps it's worth mentioning that sentences such as "the great spotted woodpecker is a medium-sized woodpecker" are used in English with the meaning "great spotted woodpeckers are medium-sized woodpeckers" so it seems to me that "apples are red" is grammatically a possible meaning of "the apple is red" even if it would be stylistically and pragmatically so weird that nobody would ever do that except perhaps as some kind of joke.
Except that apples can also be green, whereas great spotted woodpeckers are always a medium-sized woodpecker species. So 'the apple is red" implies at least a red variety of apples, never all apples, so "the" doesn't cover the whole group. But "the great spotted woodpecker is a medium-sized woodpecker" does cover the whole group (species). "The" can be either a definite or indefinite article, depending on context. That in turh changes "is" between equivalence and implication.
"An apple is red" does not imply that "Red is an apple". Use of the indefinite article makes the non-equivalence clearer.