A trackball is just a mouse to mame, so anything that looks like a mouse to the os will technically work.
Thing is, it might not feel terribly much like an arcade trackball.
There's a big difference in the feel of a little desktop trackball, and a 3" Happ arcade trackball.
But, if you were building a small scale bartop, it might be the better option. All depends.