It is clear that in Scandinavia different beliefs and customs have intermingled, and it is very unlikely that any consistent body of beliefs was ever held at any one time. (Ellis, 62)
We anachronistically attempt to systemize and rationalize what was most likely never systematized and rationalized in the pre-christian period. (Wellendorf, 52)
I open with these quotes for a reason. There is no definitive answer to your question. Beliefs about life and death varied throughout the entirety of the Viking world and age. Not just on a "national" level but even between individual families in the same area. While the idea of warriors dwelling with Oðinn in Valhalla has become the modern standard of looking at the Norse afterlife, there are actually two different main themes that can be seen when looking to the surviving literature: the dead spirit remaining within the grave mound (with a potential tie-in to an idea of rebirth) and the dead spirit entering the realm of the gods. I will focus this answer on the realm of the gods, since that is what you're asking about.
Hann heitir ok Valfoðr, því at hans óskasynir eru allir þeir er í val falla. Þeim skipar hann Valholl ok Vingólf, ok heita þeir þá einherjar.
He is also called Father of the Slain, since all those who fall in battle are his adopted sons. He assigns them places in Val-hall and Vingolf, and they are known as Einheriar. (Prose Edda, 21)
Hel kastaði hann í Niflheim ok gaf henni vald yfir níu heimum at hon skipti ollum vistum með þeim er til hennar váru sendir, en þat eru sóttdauðir menn ok ellidauðir.
Hel he threw into Niflheim and gave her authority over nine worlds, such that she has to administer board and lodging to those sent to her, and that is those who die of sickness or old age. (Prose Edda, 27)
These two passages show one way the dead are assigned within the realms of the gods. Those who fall in battle are chosen by Oðinn for Valhalla or Vingolf. Those who die of sickness or old age are sent to Niflheim for Hel to lodge. With many infections having symptoms akin to other illnesses, it would seem that the answer to your question is a resounding "no", at least based on these lines in the Prose Edda. Even if the connection was made that the illness was a result of battle, the warrior did not die in the battle. He died because he was ill, and would thus be sent to dwell with Hel. So is there anything in these lines that could be construed to say otherwise?
The first passage is the main statement about the choosing of those who go to Valhalla. My main concern is about how specific this passage is. Is there wiggle room to allow for someone dying off the battlefield to make it to Valhalla? So it seems the main part to focus on is really the middle section. Let's take a closer look at it and see what it says.
því at hans óskasynir eru allir þeir er í val falla
Anthony Faulkes in his translation moves the word order around a bit so let us rearrange his translation to the original Norse word order.
Since his adopted sons are all those who fell in battle.
You may notice that the translation still doesn't seem to quite match up with the Norse. That's because Faulkes chooses to leave out the words 'í val'. This is because they are redundant when you translate the passage to English. 'í' does usually translate as 'in' but 'val' is not 'battle'. The translation of 'fell in battle' can be contained entirely within 'falla'. So what is the 'í val' doing in this passage? Well, with the grammar working out the way it does it can be loosley translated "became the slain". So the passage should really read more along the lines of:
Since his adopted sons are all those who became the slain by falling in battle.^1
This isn't a perfect translation but it solidifies that 'fell in battle' shouldn't really be misconstrued. There isn't really leeway to say that 'fell in battle' could potentially just be referring to any that were killed or wounded badly enough to take them out of the fight. It is only referring to those who died in a battle.
Yet we can't make a concrete claim about the belief in an afterlife off a single line (even if I do spend more time than I should breaking it down), especially when there are contradictions not just from the same author but even in the same work. In the quote earlier it specifies that Oðinn is the adopted father of all who die in battle and that he assigns them places in Val-hall and Vingolf. Yet, shortly after this passage it states that "there is a place called Folkvang, and there Freyja is in charge of allotting seats in the hall. Half the slain she chooses each day, and half has Odin" (Prose Edda, 24). So while Oðinn may be their adopted father, he does not receive all of them. Freyja gets half of them. And to go even further, she chooses which of the dead she gets. This goes directly against Oðinn assigning all the battle-dead to Val-hall and Vingolf.
This is complicated even further by a passage near the very beginning of the Edda, where it is described that:
[Oðinn's] greatest work is that he made man and gave him a soul that shall live and never perish though the body decay to dust or burn to ashes. And all men who are righteous shall live and dwell with him himself in the place called Gimle or Vingolf, but wicked men go to Hel and on to Niflhel. (Prose Edda, 9)
Besides the apparent Christian influence in this passage, with the immortal soul and the splitting of righteous and wicked men, there is a very problematic element. There is no mention of Valhalla or dying in battle. Gimle is a different hall attested in the Edda, where the righteous will dwell after the Twilight of the Gods (Technically a mistranslation of Ragnarok, but it's too awesome not to use). So how can the righteous dwell there with Oðinn when he dies near the start of Ragnarok? In addition, the idea of Hel being a destination just for the wicked is not really fully attested elsewhere, and not included in the description of the goddess Hel's wards later in the Edda.
Maybe by looking at another work we can put together a clearer/less contradictory picture. In Ynglinga Saga (another work generally thought to be written by Snorri) there is a very clear account of how the afterlife is determined. Oðinn is on his deathbed and has himself "marked with the point of a spear and [claims] as his own all men who [are] killed by weapons" (Heimskringla, 13). This makes his death take on an almost sacrificial air, an idea held up by Njǫrðr's death shortly after. Njǫrðr has himself "marked for Oðinn" as he dies of sickness. This would seem to give precedent for a belief that as long as one were to be "marked" as they died, it would send them to Oðinn.
All of this is tied up in another idea in Ynglinga Saga, namely that all men must be cremated. When Oðinn takes control of Sviþjoð, he "[ordains] that all dead people must be burned and that their possessions should be laid on a pyre with them. He said that everyone should come to Valhǫll with such wealth as he had on his pyre, and that each would also have the benefit of whatever he himself had buried in the earth" (Heimskringla, 11). This idea of cremation as a path to the realm of the gods is actually attested in a text contemporary to the Viking age (as opposed to the Christianized, 13^th century accounts I've been relying on to this point). Ahmad Ibn Fadlan was an Arab traveler sent from Baghdad to meet with the Volga Bulghars. In his travels he was witness to a Viking ship funeral. At the end of the passage describing the funeral, Ibn Fadlan quotes one of the Vikings:
He said, ‘You Arabs are a foolish lot!’” So I said, “Why is that?” and he replied, “Because you purposely take those who are dearest to you and whom you hold in highest esteem and throw them under the earth, where they are eaten by the earth, by vermin and by worms, whereas we burn them in the fire there and then, so that they enter Paradise immediately."
So we can see cremation as the way into the realm of the gods, but it is not known what the Viking meant by "paradise" or how much liberty Ibn Fadlan took in his writings. It is possible that Valhalla was meant but it just as easily could be referring to some other conception. Regardless it seems that there is a precedent that one would get to Valhalla as long as they were marked by a weapon as they died and were then cremated.
Yet this idea is not seen in the Edda and is not prevalent in the sagas. It can especially be raised into question by the nature of Baldr's afterlife but I hope I've made the point pretty clear already. These ~1600 words should show that the answer to your question is a pretty resounding "maybe". As I said in my intro it entirely depends on the time period, the area, even down to specific family clans on what exact beliefs there were. This all even potentially becomes a moot point when you realize that most of the attestations in the sagas actually deal with the style of afterlife where the dead remain in their grave. Perhaps no actual Vikings believed in Valhalla at all and it was just Snorri making a neat narrative hundreds of years after the fact.