I think it is possible if not for apples greedy licensing agreements. Search google for "OSX on VirtualBox". Virtualbox is virtualization software for running other operating systems and there are posts on how to install OSX in VirtualBox (this violate apples Terms btw - so you are warned).
I'm trying to find a legal way to test newer versions of Safari for my companies website and the answer is to buy a Mac or violate terms and conditions. We are going with Apple + Aqua Connect software. I guess the other option is to use a cloud solution like BrowserStack that allows you to test web pages for different OS's / browsers. These are browsers opened on their servers controlled by scripts you set up (so you'll spend a lot of time trying to setup the scripts if they are in anyway complex). I think they use selenium or some other browser automation tool.
FYI you can test all versions of IE on all versions of MS for free at the following website: http://www.modern.ie. This is one Microsoft actually got right. kudos to MS for making web developers lives easier.
Apple is greedy/annoying/stupid and tries to find ways to force developers to buy a Mac. Most software developers are smart enough to look under the hood and realize macs are overpriced PCs. So Apple license says you can only install OS-X on Apple hardware (or people would buy/build a cheap PC and install their software). Try developing an iPhone app without buying an overpriced Mac (look at the hardware and then look on NewEgg - you'll see they charge 3x what the hardware should cost). There is no technical reason Apple does this - its just to get your money (and I used to think MS was greedy).