Would it be possible to hack a ball mouse for a computer, by:
connecting digital outputs to the photodiode in the encoders, and by giving electrical pulses, make the mouse thing the encoder wheel is rotating, and therefore move the cursor?
A lot of optical encoders have open-collector outputs, so connecting another in parallel is probably doable by hanging a transistor off a digital pin. Of course, the one on your mouse might not, and you could end up frying it. But that's why scientists use mice for experiments: they're expendable ;D
If you're interested in an emulated mouse for practical purposes, rather than the challenge of digging into the hardware, you should be able to find code on the net by people who've used various micros to create PS/2 devices.
Ooooo, USB is tough: even if you have an Arduino with an FTDI chip on it, it looks like a serial port, not a mouse. If you're running an OS with serial mouse support, you may be able to program the Arduino to emulate one.
Failing that, your best bet probably is to take a USB mechanical mouse, pull its encoders, and emulate them.