"She needs to buy a new bicycle."
Here we're concerned about the concept of "new bicycle", and not "how many bicycles". A measure word is required when quantifying, and usually also when using a demonstrative (这, 那), but it's commonly left out when we're not doing either of those things.
Unlike in English, it's not necessary to say "a new bicycle", and the fact that we're talking about only one is understood by default, unless there's some context to suggest otherwise. (And since it's not the focus of the sentence, it doesn't really matter anyway.)
However, I don't think it would be wrong, per se, to add the measure word here.
It is often the case with adjectives that precede a noun. In English it can be described in the way Chinese speak as:
I need to by a new......... of something. In this case it is a bicycle.
It is also used with colours as you have probably noticed in earlier lessons.
Such as: I need to buy a red of something.
As in: I need to buy a red colour of bicycle.
Sounds a bit weird but that is basically what the Chinese say:
I also think the reason why there is no classifier in the first sentence is because that when they say she needs to buy a new bicycle, it's not a firm number that is being discussed, just the idea that she should buy a new bicycle. The classifier is used however in the example using colour because it is a definite thing that is being purchased.
I hope that make sense.
The general rule, when the adjective precedes a noun, is to use "的" after a multi-syllable adjective, and avoid it after a one-syllable adjective.
In spite of the general rule, whether or not "的" is used after an adjective seems to be partly a matter of euphony (i.e. what does or doesn't sound good), and people often have differing opinions of what sounds good for any given sentence.
However, if you drop the noun, you can't leave out "的", e.g. "她要买新的", where the noun would be understood from the context.
My own sense is that this Duolingo sentence is better without "的". I didn't put it in, and my sentence was accepted.
Possibly when "newness" is a quality of the thing in question and not related to the awareness of an individual. For example, if my friend has had a bike for three years yet I had until today not seen him/her on it, the newness of the bike would be relevant to my awareness of the bike - not to the three year old bike. 的 would be required when the newness resides in the bike and not when it resides in my awareness. Does this make sense?