Does the right click button work elsewhere?
Is this on Windows OS? If so, go into control panel or your mouse software and see what the right-click button is assigned to do.
It might have just failed, in which case you can solder in a replacement switch or replace the mouse.
Have a spare mouse to try in its place to see if the problem persists?