The system you are working in has a few names, one of which is term logic. Term logic is not the same as classical logic and you have to make a few choices when you study it.
The inference you are describing is valid in classical logic. Syllogisms are frequently used as a teaching tool to introduce first-order logic since they are syntactically similar to natural language. However, there is more than one way to interpret term logic and more than one way to analyze it.
This apple
refers to exactly one specific apple and so can't be handled directly by the syllogistic framework. However, we can paraphrase it using a universal. The conclusion 1 + 1 = 2
also doesn't have a representation in term logic, but you're using it as an example of irrelevant conclusion so I'll replace it with all numbers are even
.
P1: Every instance of this apple is red.
P2: No instance of this apple is red.
C: All numbers are even.
Whether this syllogism is valid or not depends on your point of view.
From the perspective of modern classical logic (classical first-order logic), this inference is valid because of ex falso quodlibet.
However, because the language of term logic is so limited, historical philosophers were able to write down the valid inferences and there are some gaps that are telling.
For example, the following syllogism is valid according to the semantics of modern classical logic, but isn't listed as a valid syllogism.
All A are B.
All B are C.
---------------
Some A are C.
The following syllogism, which is similar in spirit to your question, is also not attested (note that the last conclusion is arbitrary).
All A are B.
No A are B.
-------------
Some C are D.