Using a Gauss Rifle or Coil gun would require ferromagnetic material, but alternatively using a rail gun would not. I would also like to specify that below is meant to be a hand held weapon, however this question is about the projectile and not the rifle itself.
What I'm trying to do is to make a rifle that fires bullets that are made of some biological material that is both magnetic enough to fired out of a Gauss Rifle (link describing what that is exactly earlier) and is suitable material to actually make a bullet out of. The early concept was a rifle that "grows" bullets inside it's chamber using a combination of genetic engineering technology and stem cells. The bullet would be hardened on the outside and take the shape of an ordinary modern bullet, perhaps the size of a .22 LR round, but be filled on the inside with some kind of fast acting flesh eating bacteria that would make any wound fatal within a few minutes assuming the bacteria was not killed somehow. However, upon further thought I realized that wearing body armor of any kind would effectively stop these from happening since the bullets would be hollow point in order to shatter inside the target releasing the bacteria. The idea then came to me that accelerating such a bullet to an appropriate speed, and perhaps changing the design slightly, would allow the bio-bullet (as I call them) to pierce the armor. Maybe a bullet designed such that when the wedge applies pressure, or it meats (pun) the resistance to spin created by flesh in a person, it widens or breaks? I can't say I know too much about the physics behind projectile weapons so I can only have ideas, not speak to their scientific accuracy. I've got my heart set on the biological/cronenberg theme, so I'm hoping there is a way to make it work!!
This edit is to explain that while this question ask if a living animal could evolve to have a railgun as a natural weapon, I am specifically asking about making a projectile outthat can be fired out of a traditional rail gun or coil gun (man made magnets and metal and all that jazz). This is different because it does not have to do with evolution but rather biological engineering, and concerns only the projectile and not the rifle in its entirety.
Additional edit: As can be read in this paper I found, it might seem that genetically altering flesh eating bacteria to take on the additional properties of "Magnetotaxies" (as they are referred to in the paper). These are bacterium that swim along magnetic field lines toward a particular polarity, and additionally dead bacterium become orientated relative to the magnetic polarity they were observed to follow, even after the poles switched. Combine these properties with the properties of a flesh eating bacterium, and the first problem of this projectile has been solved.
The remaining problem is the delivery of these bacterium to the target via a hardened, hollow cartridge. The material that comes to mind would be bone, since the magnetic properties of the bacterium would allow for the propulsion of the bullet and thus the cartridge itself does not need to be magnetized. However, the hollow point design is rendered ineffective by body armor and by the fact that these bacteria would be propelled out of the nose of a hollow point bullet by the magnets rather than propelling the bullet itself. a hollow point too small for a bacterium to pass through would render the purpose of the hollow point design, to shatter inside its target, pointless. How might one design a projectile to break upon entering a a human target without using hollow point?