Disclaimer: I am a law student, not a lawyer, and don't claim to have a legal opinion one way or another. My answer is intended to provide a few potentially relevant examples from case law in order to make the point that you should be cautious (and seek proper advice if you think that caution is warranted). Nor am I claiming that the facts in these cases are the same as yours; merely that they highlight the flexible approach that the courts take in such cases, and the fact that this area of law is complicated.
I don't think it is sensible to just assume that there is no way that your girlfriend could acquire property rights as a rent paying tenant if arranged on an informal basis with no evidence of the intention of the arrangement. One of the answers mentions a bill which is intended to give non-married partners more rights than they have presently. But the existence of that bill doesn't prove the absence of any existing law, it merely suggests a possible legal position that might exist in the future.
A worst-case assumption should also be made here, since you're considering the possibility of what can go wrong. So let's say for the sake of the argument that you have a horrible break up and your girlfriend is willing to be dishonest about what the intentions were regarding the flat (e.g. will claim that she understood the arrangement to be that she would acquire ownership rights in exchange for paying two thirds of the monthly mortgage repayment).
Grant v Edwards  Ch 638 - Defendant had property in the name of himself and his brother. Claimant paid nothing towards the purchase price or towards mortgage payments, but paid various outgoings and expenses. The court found a constructive trust in favor of the claimant, who received a 50% beneficial interest in the property.
Abbot v Abbot  UKPC 53,  1 FLR 1451 - Defendant's mother gifted land to a couple with the intention that it be used as a matrimonial home. However it was only put into the defendant's name. The mortgage was paid from a joint account. The claimant was awarded a 50% share.
Thompson v Hurst  EWCA Civ 1752,  1 FLR 238 - Defendant was a council tenant. Later, she formed a relationship with the claimant. They subsequently decided to buy the house from the council, but it was done in the defendant's name. The defendant had paid all the rent while a tenant, and all the mortgage payments while an owner, as well as all utility bills. The claimant sometimes contributed towards the council tax and varying amounts towards general household expenses (housekeeping, children, etc.). During some periods he paid nothing at all, and at other times he did work around the house. Claimant awarded 10% ownership.
Aspden v Elvy  EWHC 1387 (Ch),  2 FCR 435 - The defendant purchased a property in her sole name 10 years after the couple had separated. The claimant helped her convert the property into a house. He did much of the manual work himself, lent his machinery, and contributed financially to the costs. He was awarded a 25% share.
Leeds Building Society v York  EWCA Civ 72,  HLR 26 (p 532) - Miss York and Mr York had a dysfunctional and abusive relationship and lived together from 1976 until his death in 2009. In 1983 Mr York bought a house with a mortgage. He paid the monthly mortgage repayments and other outgoings. At varous times Miss York contributed her earnings towards household expenses, but the judge held that this did "not amount to much" over the 33 year period, albeit it had helped Mr York being able to afford the purchase in the first place. She also cooked all the family meals and cared for the daughter. She was awarded a 25% share.
Conclusion: Don't make assumptions, consider posting a question on https://law.stackexchange.com/ , consider legal advice, and consider having a formal contract in place which states the exact intentions of the parties. It is a general principle of these kinds of cases that the parties need to have intended for the person lacking legal title to acquire a beneficial interest, and proof to the contrary should make such a claim likely to fail.
Alternatively, decide that the risk is low and that it's not worth worrying about. But make a considered decision either way.