In Hebrew, to make a whole phrase definite, you need to add the definite article to each part. So
תפוח יפהa beautiful apple
would become התפוח היפה the beautiful apple
The sentence התפוה יפה or התפוח מתוק shows that the adjective is a predicate adjective because it does not share the definite with the subject. Therefore, you don't need to add a copula, as it is already a declarative sentence.
But if you want to say "an apple is beautiful" or "an apple is sweet" you would need a copula, in this case הוא
תפוח הוא יפה תפוח הוא מתוק
The problem with this and many similar sentences on Duolingo is that it expects verbatim English translations instead of translations into typical English idiom. The latter of course has a problem of varying across English dialects. In my dialect, one would only say a beautiful apple in the case - as you suggest - of a beautiful painting of an apple. However in cases where a Hebrew speaker would use words such as יפה or טוב the correct idiom in my dialect of English would be to use the admittedly overused word "nice" and not "beautiful" or "good" which are reserved for very particular uses.
In my dialect of English, "nice" would be the best translation of יפה here, lacking more context. And it has the advantage that the word יפה is similarly overused and multipurpose in Hebrew as nice is in English. But whereas "beautiful" can be used for יפה in other contexts, using "good" is more idiomatic and would be unlikely to survive a retranslation process, where you would translate "a good apple" back as תפוח תוב (literally) or תפוח טעים (idiomatically). And Duolingo has preference for translation choices which retain integrity bidirectionally (a fault of the system and a fault of learning language through translation).
So what I mean to say is that although "a good apple" may carry the same connotation in many cases, it isn't as literal a translation as "nice" or "beautiful".
As far as I know ´the apple is beautiful´ should be correct either.
There was an other sentence where answered with this form, 'a beautiful apple' and there the answer had to be like 'the apple is beautiful'. (other words but same construction)
Please correct me if I'm wrong...
To differentiate between "a beautiful apple" and "an apple is beautiful" we use a copula, in this case "הוא" תפוח יפה = a beautiful apple תפוח הוא יפה= an apple is beautiful
Without the copula, there's no indication that you have a declarative sentence, and you assume that the adjective is just modifying the noun