Put simply: does demand justify supply? If I sell an item - for instance, a computer-games machine - for a price that is much higher than either the RRP or the shop advertised price, and am able to do so given the scarcity of the item and the large demand for it, can I justify this by simply claiming that the fact that a person is willing to buy for that price justifies my selling it to them? Can this question be resolved so simply?

You are right to worry that this question cannot be simply resolved. In the case of the computer gaming machine, it seems reasonable to let demand determine the price. Even though people may very much want these new technological toys, nothing bad will happen to them if they cannot get them. But suppose we are talking about a scarce drug that has the potential to cure a life-threatening illness, such as bird flu? Or what about the resources (space in a car, or gas, say) to flee a city about to be overrun by an invading army? Those who hold these scarce and potentially life-saving resources are in a position to exploit the vulnerability of those whose life depends on having access to them. Whether it is morally acceptable for demand to determine price depends on whether the thing is needed or merely wanted; and if it is needed, how acute that need is. This means that, as you suspected, there can be no simple answer to your question.