There’s sometimes a lot of assumptions about what the Jedi do/don’t allow because our own expectations get in our way all too often, but the truth is that it’s not really very clear. We have some context to go off of, but ultimately we’re never actually told. The Old EU was basically published fanfiction in a lot of ways, George himself said that that was never part of his Star Wars, Filoni talks about how it was made clear that stuff wasn’t canon, etc., so we really only have what was in the movies, the TV shows, and in interviews. And some of that stuff is even going to be coming from unreliable narrators!
Like, Anakin Skywalker is pretty clearly not necessarily a trustworthy source of information, because this is the guy who’s like, “Obi-Wan doesn’t trust me!” and Padme has to point out, he trusts you with his life every single day, you beautiful dumbass, he trusts you like really a lot! What little we get about love comes in a conversation where Anakin is already explicitly trying to bend around the rules and justify what he wants (a thing Anakin does frequently throughout all of canon!) and so what’s the truth? Anakin’s not a source we can wholly trust on this. Nor can we trust Padme, because she doesn’t know anything about the Jedi, that’s clear in the scene, too. And in ROTS, it’s unclear about why their marriage would get them both expelled–but I’m pretty sure at least part of it is that he’s a Jedi and she’s a Senator, meaning that she’s his boss, because the Jedi are under the jurisdiction of the Senate.
In TCW, Obi-Wan says he would have left the Order for Satine, but it’s unclear whether he would have had to leave to be with her at all or if it was because he felt that he would not be able to remain able to do his duty if he tried to split himself like that. Or because she was the Duchess of Mandalore and thus the politics (because the Jedi weren’t their own body of government) would have made it impossible.
He also tells Anakin later that of course they’re allowed romantic feelings, but he needs to remain friends with Padme, but it’s unclear if this is a hard rule or because Anakin is going to absolute pieces over this. He’s in a rage spiral that’s leading up to ROTS, he’s not handling this well, he’s brooding and snarling and lashing out. He’s not handling it and that be entirely Obi-Wan’s point, that he’s become attached in how the Jedi define it.
This contrasts with how, in the original ROTS screenplay (which made its way into the adaptations of ROTS as well, though, those are no longer canon) Obi-Wan did know about Anakin and Padme’s relationship, when shit’s going down, he asks her to help Anakin and indicates he’s known for awhile. Is this because, as long as it’s kept in balance, as Obi-Wan possibly thinks Anakin has managed to get back to, it’s allowed? Or is Obi-Wan bending the rules for Anakin, because he wants Anakin to be happy, regardless of how it’s crossed over the line from healthy and into attachment? Both cases would make sense for the characters!
“Attachment” is a word that gives us a lot of grief because we often want to define it one way, but all the times George talks about it, it’s in the context of possessive relationships, of being owed that person’s presence in your life. When Pablo talked about it, he backed that up as well. And attachment really seems to come down more to trying the concept of trying to hold onto something as you want it to be, rather than how it is, not in the sense of “having a connection with someone”, because otherwise Mace and Depa’s “continuing to have a strong bond”, for example, doesn’t make a whole lot of sense. When Yoda talks to Anakin about attachment in ROTS, it’s because Anakin’s not there looking for reasonable help, he’s there to look for a way to stop death because he’s going to burn the galaxy down if he doesn’t. That’s going way past a reasonable amount of worry about what’s going to happen and right straight on into, “Unable to accept what things actually are/that things may change without his permission.”
So, that’s pretty much where we sit. There’s no reliable in-universe person telling us the Jedi aren’t allowed romantic relationships so long as they keep their shit together, because every situation has context to go along with it that would just as easily support, “Decide if you can keep it in check because you have a duty as a Jedi that must come first.” The reliable ones (like Depa Billaba, like Cyslin Myrr, like Mace Windu, etc.) tell us emotions are there, but must be kept under their control, rather than they themselves under the control of their emotions.
The thing is, the Jedi are given a tremendous amount of power and legal authority. Their connection to the Force gives them abilities that can very easily hurt others, based on their unbalanced emotions–we see what even just a partially trained Force-user acting out of fear can do, when Ezra makes the fyrnocks attack. A trained one like Vader can just straight up blast even Ahsoka Tano right into unconsciousness just by feeling her out! That’s a lot of power given to one person, add in that they’re given the authority by the Senate to help people across the galaxy? People who fear them because they don’t understand them? The Jedi understand that they have to keep their shit under control (not repressed, canon’s pretty explicit on the front of how several Jedi have said emotions are necessary, you just need to control them before they rule you) because otherwise they’re going to leave a lot of hurt people in their wake, all the more so when given the legal power they are. If you have the authority to cut someone’s arm off with your lightsaber because the Force told you it was necessary? You better make damn sure you’re not doing it out of unbalanced emotions.
You put all that together and I think where we end up is this: Jedi are allowed relationships, so long as they can maintain balance with them. Probably not marriage (but, again, we don’t actually know) but relationships that don’t unhinge their focus and ability to be objective in a situation where they have power over other people? Not celebrated, but allowed. But Anakin Skywalker was never going to be able to do that. He wanted love to consume him, he wanted it to be everything, he wanted it so much (and in the way he wanted it, not the way it was) he would burn down the galaxy for it. That was never going to be allowed to a Jedi, because their position in the Republic would have been an abuse of the power they were granted and the abilities they wielded.