if you duolingo mean "There is an apple in that dress.", in portuguese the correct sentence must be: "HÁ uma maçã nesse vestido".
"Tem uma maçã nesse vestido" refers to a subject thats executes the verb/action: TER (to have), in this case second or third person (você, ele, ela).
Há, the preposition a (à, às, etc) and the pronoun a seem to all be avoided here in Brazil and replaced with more easily pronounced (albeit grammatically "incorrect") equivalents. Há to mean "there is" is rarely used in speech and is often only used in the past or future tense.