The cost of new cable isn't much so consider that.
There are two(2) types of IDE cables(I assume yours is IDE). Yes, they can both be used under the master/slave setup of cabling. HOWEVER, not for CS cabling setup. That's because it requires a 40-pin/80-conductor cable(newer type) and the older type is 40-pin/40-conductor. If you had both in hand, one can tell the difference. Usually, HDs use the newer type as std. connection now, but the CD can too. So, if you have the older type, beware. If you have the newer type, good to go. If you buy one nowadays more than likely will be the newer type. I exclude any mention of SATA cabling as you didn't offer that as a possible cable use. IDE cable are also called PATA cables.
I was wondering, if i were to take the IDE cable from the Cd drive and use it to connect a new harddrive in my computer, would that work? Do they also use the same power pin connector?