I'm not sure this is possible. Knowing someone has romantic feelings for you changes the dynamic, and things are almost certainly going to be awkward for at least a while. If you truly don't expect anything from her and want your relationship to stay the same, you're probably best off keeping your mouth shut. However, if you want her to squash that tiny iota of hope you're harboring and relieve yourself of a secret, it may be possible to do that.
There's no guarantee your confession won't ruin things, but there are a few things you can do to minimize the risk. Personally, if a friend told me they had a crush on me but weren't expecting me to do anything about the knowledge, they simply wanted to tell me, I wouldn't believe them. People confess romantic feelings because they want a romantic relationship. If you don't want anything to change, then why bring it up? Ask yourself if you're truly okay with her turning you down completely and unequivocally. Be honest. If you can't, then this is probably a terrible idea. She's already going to doubt you'll be fine with it, and that's what makes it awkward. To get around this, you'll have to provide a convincing and sincere reason for telling her other than seeking a relationship.
Luckily, you've got a fairly convincing reason in your question: you know it's absurd, but there's a tiny voice telling you that if you never say anything, you'll never know for sure she's not interested. You want to say something so she can tell you straight out that she's completely uninterested and you have zero chance. Say that. If she tries to soften the blow when she says no or seems uncertain how to respond, reiterate that you truly need a devastating rejection so you can put the idea to rest for good and move on. She's going to be hesitant about turning you down because she won't want to hurt you, so let her know you won't be hurt and you fully expect rejection. Be upbeat and sincere, and maybe she will believe it and be honest.
Although I've not been in this exact situation, I do often ask people if they want to do things that I want them to feel zero pressure to agree to. I've had good results with cheerfully telling them "you can say no, I promise, it's totally fine." It often gets people to admit they aren't really interested. Especially if there's a reason I expect they'll probably say no (short notice, likely to already have plans, etc), then I'll even preface the request with something like "I know you'll probably be unable to, but I figured it doesn't hurt to ask just in case you happen to be interested and available..." It only works when it's sincere though, which is why I say not to try this unless you really mean it.
After she confirms that no, she is not interested, thank her with a positive attitude. At this point I'd probably acknowledge she's probably feeling awkward and uncertain about how things will be between the two of you. Personally I'd make a joke like "so... How long should we be awkward around each other?" Don't pretend like your confession should have no effect on her whatsoever, that's not fair.
Hopefully she'll laugh it off and say things will be fine, but it's possible she'll want some space. That's her right, and it's the risk you're taking by telling her you have romantic feelings for her. Even if she wants to stay friends, she may feel like she's betraying her boyfriend by being close friends with someone who likes her. It's possible he's a jealous person and has already expressed concerns about you. Maybe a part of her is attracted to you, and that will make her decide it's too risky to her relationship to be close to you. There are lots of reasons outside of your control that could cause this to end badly for you even if you do everything right.