The Prime Minister has said a second referendum could be included in Labour's next general election manifesto.