In the UK you can lawfully call yourself anything you like ( except for the purposes of fraud). So, if you call yourself Rumpelstiltskin, everybody knows you as Rumpelstiltskin, and you put Rumpelstiltskin on the record, that's who you are, and the record is legal, so the marriage is legal.
Getting a passport may be a different matter, since you have to prove your name somehow - usually by providing a birth certificate. It is a bit more complicated if you want a passport in a name not on a birth certificate, but it can still be done.