The thing about those second referendums on treaties is that the second referendum was won by suggesting that the consequences of a second 'no' would be exclusion from the EU. Given that this referendum is about voluntary exclusion from the EU ....
In principle, following a vote for 'Leave', there is nothing to stop the UK government entering into negotiations with the EU on various points and then approaching the electorate again, with a second referendum, based on a re-negotiated relationship with the EU.
However, who would do that? It would hardly be very popular with the electorate. It would be career-ending for any PM presenting such a solution and I suspect it would have huge consequences for any party taking such an approach. Really, who would do it, and how? Can you honestly imagine Cameron, or even Johnson (who has implied this would be a possibility) actually standing up and selling it as an idea?
And as the process of negotiation went on, followed by a second referendum, over a long period, there would be continued uncertainty = market unrest = recession. It would be a real mess for the party in government.
Well, if the vote is for 'Leave', I guess we'll find out.