There won't be a second referendum if the first doesn't go their way, it sounds preposterous ! You cannot offer a referendum then ignore the will of the people.
Presumably once the government has concluded negotiations with the EU to agree the relationship post Brexit, those arrangements would have to be ratified by parliament? The referendum result wouldn't give the PM a blank cheque to agree any and all exit arrangements. Parliament would be entitled to vote down those arrangements if they thought the PM had made a terrible deal, or a deal that was at odds with the expectations of the people at the time of the referendum. If, rather than voting down the exit arrangements, they offered the people a second referendum to ratify the agreement negotiated by the PM, they wouldn't be ignoring the will of the people.