I answered exactly the same in some previous lesson and it was wrong although duolingo translated "die Flasche" as bottle or a flask when you hover over "die Flasche" with your mouse. The best thing you can do if you're not a native English nor German speaker is to google translate certain words from English to German (and vice versa, but only 1 word! no phrases and other things that google will probably mess up) and see the synonyms for those words. On the right side below the translation in German you'll see the "strength bar". It shows what's the "best" and most common choice between multiple synonyms.
Here's the link to the translator with aforementioned example: https://translate.google.com/#en/de/flask
It helped me a lot to really get some words, to really know what they fully mean, because English has A LOT of words.
This page shows a brief overview regarding the differences between nominative, accusative, dative and genitive cases. http://answers.yahoo.com/question/index?qid=20080124141611AAuKA8N Wikipedia provides further details.
Flasche can be everything: glass bottle (Glasflasche), plastic bottle (Plastikflasche), beer bottle (Bierflasche), wine bottle (Weinflasche), baby bottle (Babyflasche/Milchflasche/Fläschchen), water bottle (Wasserflasche)...
Everything handy you use to transport fluencies and it is possible to drink out. It always has a cap and usually it is made of plastic, glass or sometimes metal. Canister and can are not Flaschen, because they have no bottleneck. Flasche is also a word for a person, who is not very clever and is not able to do many things.
Some prepositions always take the dative case. Aus is one of them. So, since Flasche is feminine, and it's in the dative case, it takes der. For more information, see: https://www.lsa.umich.edu/german/hmr/Grammatik/Praepositionen/Prepositions.html
How come "He drinks out the bottle" is wrong? People say that in English