This is a common issue where the PM needs a scarce resource, and there is insufficient capacity to allow all demands on that resource to be met. Ultimately, someone in the organisation has to make a judgement call. There are several options including the following - and there may be others:
- Allocate the resource to one or other project;
- Split the resource's time between the projects;
- Augment the resource with a suitably skilled resource from elsewhere, either internally or externally;
- Re-sequence some of the tasks within the project to use the scarce resource at a different time, thereby removing the conflict.
Some of these may not be practical: for example it may not be possible to re-plan if the tasks to be done by the scarce resource are on the critical path, but some of these - or some combination of these - may work.
Ultimately, if the PMs of the competing projects cannot reach a consensus on how to deal with the issue, they need to escalate to a higher authority, presenting their case and all of the facts, including the impact (cost / time / quality) of the various options, and let that higher authority decide how to allocate the resource. If handled properly and professionally, this should not be confrontational. It is simply a case of allowing the right person to make a business decision that everyone else agrees to accept, with no recriminations.
One final point is that if the specific risk of such a resource conflict can be foreseen in advance, this should be raised in the project's risk register, and escalated early to allow the decision to be taken early. I don't mean a generic risk such as "there is a risk that resources won't be available" - that is not detailed enough to allow action to be taken to offset the risk. Rather, raise a risk such as "there is a risk that resource X will be unavailable due to being allocated to another project" - which should be sufficient to allow steps to be taken to mitigate the risk before it materialises.