"I don't know enough about Parliamentary Law to know if a Government can ignore a defeat in the House of Commons, but if they do, they certainly risk a vote of No Confidence by the Opposition, which might just be carried by a few dissenting Tory MPs and result in a General Election."
I don't think it's law, just procedures of the House.
If it was a free vote then AFAIK there are no consequences at all, likewise if it was a minor element of a govt. bill.
If it was on a key principle of govt. policy and the govt. had an overall majority then a govt. might resign although resignation as a point of honour seems to be out of fashion these days. If it didn't there might well be a vote of no confidence (respecting votes of no confidence also seems to have gone out of fashion, doesn't it Jeremy?).
With a minority govt. there'd be more of an expectation of the govt. just continuing on the basis that it couldn't really expect to get everything through and there might not even be a vote of no confidence if the opposition didn't fancy facing an election at the time. In any case there's no precedent for this with the current law on elections which was partly intended to avoid this turn of events for the late coalition.
The real issue here is what happens in the event of a motion that most members of most parties don't want, isn't govt policy (assuming a remainer becomes PM) but has come about as a result of a non-binding referendum. I'm sure that must be totally unprecedented and very hard to call. Labour might try to play politics and abstain, turning it into a Tory in-fight. However with their own party having its own problems at the minute do they really want to provoke a major constitutional crisis?
There could well be a case of here's the referendum result, here's a free vote on it and let's tip-toe around it and carry on.