Probably. It depends on what sort of MP5 you have. An AEG can be rewired to move a battery location. My limited experience is the wiring usually moves the battery TO the stock to accomodate a larger battery.
If the stock is folding, collapsing or non-existent (MP5K) then there is not enough room for a battery. The foregrip is commonly used for an interior battery compartment.
One can also use an external battery compartment, such as a battery bag, mock PEQ box or a fake spare magazine.
You can also duct tape a battery to your gun. Not an aesthetically pleasing solution but one that works.
On a sidenote, a lipo battery is small. A previous owner might have used a lipo on the gun and relocated the battery from the stock to the foregrip. I'm not sure why someone would do this but it's within the realm of possibility.