Mouse without drivers use the USB default HID descriptor for input devices. Inside that there are basic functions that work by default. That is how a usb keyboard can control volume without a driver loaded.
I agree the mouse back and forward are annoying. I haven't done it before but what would need to be done is to block those actions at the HID level. It would kill it for all applications though, not just firefox.
I found a solution that is easy to use and free
Download autohotkey basic and install
http://www.autohotkey.com/download/
open notepad and enter the text below:
Code:
XButton1:: return
Xbutton2:: return
Save the file as mouse.ahk , make sure notepad doesn't add the txt extension.
Now double click the mouse.ahk file you just saved. You should see an icon in the systray with an H on green background, that is autohotkey running the script.
Now as long as the script is running the two side buttons for next and back are disabled.
Script is simple , Xbutton1 is the name of the button, : is the start of routine it should do when button pressed, : is the end of the routine, and return sends it back to the beginning of the script. When pressed the button is being processed and nothing being done
Autohotkey has a ton of other functions you can automate, check the help file or website.