The short answer to this question is “Yes!” The long answer is, “No.” Let me explain.
An odd object has been found in Iraq dating from the Sassanid period (224 to 640 AD). It’s basically a terracotta pot containing a copper cylinder made of a single sheet of copper, with a single iron rod inside them. Put together, this device looks similar to an electrical battery.
The theory is, if you put the correct chemicals into this jar, you could use them to create a chemical reaction that would generate an electrical charge. This is demonstrably true. Experiments have shown that Lemon Juice, or Benzoquinone (which could have been collected from beetles) and vinegar could be used in a device like this to generate electricity. You can even build a replica yourself. Depending on how you use them, replicas have produced between 0.8 and 2 volts.
So, yes, the Sassanids could have produced electricity. But what would they have used it for? The original theory was that it would be used for electroplating gold onto silver objects. We know that the Sassanids were particularly good at this. However it is generally believed now that the Sassanids fire-gilded with mercury to produce these items. Being able to do it inefficiently in a slightly different way wouldn’t have even been a good trick.
The big problem is that the battery theory doesn’t match with the device. We’ve found no wires, and no electrical equipment associated with these objects. Further, no conductive metal is open to the elements, so it’s not clear how you’d get power out of it.
So what were these objects used for? We have found similar artifacts that were used for storing holy scrolls. The only difference is that these weren’t covered in clay. We could assume that these objects had a similar use. If an scroll had been left in them and had degraded completely, there could be an acidic organic residue left that is unfortunately similar to what would be left by a battery.
So, yes. A battery could have been made using pre-industrial technology. But the only evidence that it was used in this way comes from experimental archaeology. All this can really tell us is that it’s technically possible to construct a battery, not that it ever actually happens. This is the kind of information that’s useful to accidental time travellors, maybe. But doesn’t help us to understand the past.
But then, nothing is certain. If people could have made electricity, who’s to say they didn’t? These objects haven’t attracted much attention from serious archaeologists. Maybe there’s further study to do.