Do I need a pancake box to hang a ceiling fan or can I use what is already in the ceiling?
Try to pull the wires out a little more and check the writing on the box. It should tell you if it's ceiling fan rated. Even if it is, it's always good to remove a few screws and make sure it's mounted securely to joists. If it's not rated for a ceiling fan, you'll have to replace it with pancake box or some other ceiling fan rated box. Make sure the power is off before doing any work. Even though you have the wires nutted, you'll need to remove the wire nuts to replace the box. I've seen people get knocked on their butt because they forgot to turn off the power before removing the wire nuts.