If the foul is committed inside the box it is a penalty, if it happens outside it is not.
I thought this was common knowledge; bit surprised to hear a referee doesn't know this.
In a counter-attack, the AR is often best placed to decide where the foul took place - so when a foul is close to the area, discussion is a pragmatic choice to be clear about and 'sell' the decision.