Although I haven't done this myself, I presume it doesn't matter where the battery holder comes from.
If push comes to shove, I'm thinking you can cut the old battery off, leaving small stumps to solder some suitable lengths of wire to then solder the holder to the wires. The battery holder can then be placed out of the way.