In short: immersion helps a great deal, but it is neither always essential, nor always sufficient.
There are a few definition problems here. What counts as immersion, and which aspects of it do you consider essential?
Exposure: reading and watching and listening to people speak in a foreign language.
Active use: producing sentences in the language yourself.
Interaction: getting immediate feedback in the form of a natural conversation.
Speech: all of the above in speech (so not only in written communication).
I think by immersion you mean you get all of the above.
How well does one need to know a language for you to say that one has "learned" it? There is a very wide range between "can buy bread at a supermarket" or "can read a comic book" on one hand, and "can successfully pose as a native speaker" or "can win literary prizes for writing novels in proper style" on the other.
While I think your progress will on average be slower without the above four points of immersion, you can certainly learn a language very well without some of them. If you watch a lot of French films, read a lot of French, chat with people on-line in French, but never visit a Francophone country, you can still learn to read, write, and speak very good French.
Conversely, many people who have lived in France for several years will still make grammatical errors and have a fairly noticeable accent. Moreover, if you never read good literature, your French will most likely never approach that of an educated Frenchman, not even after 30 years of immersion.
Conclusion:
A. It is easier to learn skills associated with producing language by immersion than by other means, but you can still learn them.
B. Immersion is not enough for other skills, such as educated reading and writing.
C. It greatly depends on the person.
Immersion should be considered an important and efficient tool, but it is neither absolutely essential nor always sufficient. The best and quickest way to learn a language in all its facets is by a combination of reading, writing, and immersion (so speaking and listening). Reading includes both novels and grammar books. Chatting on-line has some of the important aspects of immersion, but it is of course confined to writing.