I've always loved those wild cross-company matchups, and yes — Batman has shown up alongside Marvel heroes, but only in special crossover events, not as a regular Marvel character.
Back in the day there were a handful of officially sanctioned team-ups where DC and Marvel let their icons share pages. Notable examples include the old-school team-ups like 'Superman vs. The Amazing Spider-Man' and the one-shot clash 'The Incredible Hulk vs. Batman'. The big 1996 event 'DC vs. Marvel' (sometimes called 'Marvel vs. DC') is the most famous: characters faced off in battles and then the companies spun out the fun 'Amalgam Comics' experiment, which fused characters into hybrids. Batman’s DNA showed up there as 'Dark Claw' — a moody Wolverine/Batman mash-up that still cracks me up and thrills me at the same time.
Later on the grand crossover 'JLA/Avengers' brought the Justice League and the Avengers together in a massive, lovingly produced event where Batman appears as part of the League. Outside these special, mutually agreed projects, Marvel can't just drop Batman into its ongoing titles — rights and continuity keep him squarely on DC's side. For me, those rare team-ups are like epic fanfiction made canon; they scratch the crossover itch without breaking the rules, and I always re-read my favorites when I want that improbable face-off energy.