Say I buy a DSiWare game from the E-Shop, but own it on the 3DS, would I be able to play online with a friend who has the same game, but only owns a DSi? Or would I only be able to play online with people who own the game on the 3DS?
This is the internet, all opinions are considered invalid.
When you play a DSiWare game on the 3DS, it doesn't run in 3DS mode. The game itself doesn't even know it's running on a 3DS, so you will not be treated any differently. There's no special server for 3DS players, nor will they know you're a 3DS player.
Official 3DS Ambassador Now playing: Atelier Iris 3, The Legend of Zelda: Ocarina of Time 3D, that game with the mobster on the box