Looking at recent press releases from their website, it appears they prefer "the National Science Foundation".
Join representatives from the National Science Foundation...
It also sounds more natural to a native speaker when "the" is included.
However, note they choose leave off "the" when writing just "NSF":
In particular, NSF is interested in proposals from national broadcast networks...
This appears to be their chosen style. It's generally up to the organisation to set its own conventions.
Some organisations do different things, for example, some capitalize the "The" (for the example "The Age" is always capitalized), and some include "The" in the abbreviation e.g. The Wilderness Society becomes "TWS", so you just have to see what each organization does.
So I would suggest:
This study was funded by the National Science Foundation.
This study was funded by the Ministry of Science.