This bug has cropped up before:
http://www.machinarium.com/machinarioforum/index.php?topic=89.0I just tried to recreate the error but it does not affect my (paid) version of the game on an XP Pro sp2 machine.
Have you tried hitting the TAB key to see if that brings your pointer back to the foreground?
Or you could try probono's solution, "able to work around it somehow with a combo of right click, zoom in, move around a bit, zoom out again..."
Please reply with the results of your experiments.