My answer now shifts to, I don't think this defense exists, but you would have to look at what ever possession statute the defendant was charged under. If there is no intent element in the specific statute then possession is strict liability. See Esteban v. Commonwealth (strict liability when a teacher accidentally brings a pistol to school in her purse). For instance 18.2-308 states
If any person carries about his person, hidden from common observation, [various weapons], he shall be guilty of a Class 1 misdemeanor.There's no intent anywhere in that statute and Virginia's appellate courts have been clear that if a non-common law statute has no intent included no intent is needed for a conviction.
Other firearm statutes require "to knowingly and intentionally" possess (§ 18.2-308.1:1; 18.2-308.2) or to possess "with knowledge and intent" (§ 18.2-308.4(A) & (B)). So, possession would not be illegal under these statutes if the firearm was possessed by accident or was planted on someone.
However, I can find no intent in a Virginia statute which matches the D.C. innocent intent doctrine. The nearest thing I can find the "necessity defense." This defense requires (1) a reasonable belief that the action was necessary to avoid an imminent threatened harm and (2) a lack of other adequate means to avoid the threatened harm and (3) the evidence must prove a direct causal relationship that may be reasonably anticipated between the action taken and the avoidance of the harm. Waller v. Commonwealth, SEP08, VaApp No. 1024-07-3. A generalized fear that someone will harm a person at some time is not enough to possess a firearm. Byers v. Commonwealth, NOV01, VaApp No. 2269-00-3. However, if someone is under fire, runs to his father's shed, and gets his father's shotgun to defend himself and his girlfriend a necessity instruction can be required. Humphrey v. Commonwealth, OCT01, VaApp No. 1982-00-2.