I did the same mistake in another lesson. I learnt that sandwich is a neuter and also masculine noun so I always assumed that both are correct and einen Sandwich is fine. Some German speakers have never even heard that sandwich is also a masculine noun. In principle, it should be only neuter because how can something be neuter and masculine too. So I suppose we are always on the safe side as learners, assuming that sandwich is a neuter noun.
It's not completely unheard of that a noun has more than one gender. Usually, it's a regional thing. For instance, a lot of people in Southern Germany, Austria, and Switzerland say "das E-Mail", but in Northern Germany you'll only ever hear "die E-Mail". Sometimes, it's completely personal preference. For instance, the gender of "Nutella" (the hazelnut chocolate spread) is a matter of great debate.
The terminology is a bit confusing. ;) Perhaps you're thinking of "Käsebrötchen"? Here's a more detailed breakdown:
- a buttered slice of bread topped with cheese (and other stuff)
- bread that has cheese baked into it (not a common thing over here)
- a bread roll that has cheese baked on top of it
- a buttered bread roll topped with cheese (and other stuff), also called "belegtes Brötchen mit Käse"