Yes it was a dream. You just witnessed Mari's special ability.
IndustriousMechanic said:
No, I think it was. Maribel can just bring back souvenirs.
But, if it was a dream, then why was Renko in it, if she itself didn’t remember anything from the events? And I thought that Merry could only visit “Gensokyo” on her dreams, she can also visit the “outside world” while sleeping too..?