I just bought a flyback transformer, or rather, a high voltage generator, and it says it takes 3v dc but is that possible?
It sounds like you bought a high voltage generator like this, which contains both a transformer and an oscillator to drive it. If this is the case, you will only need to input the required voltage. (In your case this is 3v dc, which you can obtain from two AA batteries in series) If you have a flyback transformer, you will need your own driving circuitry. This page has many possible circuits you could use.