You'd need both, not one or the other... A PassMe allows DS code to be executed from the GBA slot. A M3 is a flash media adapter that can be used with GBA and NDS to play games and use homebrew. A M3 used alongside a PassMe allows DS games and homebrew to be played from the M3. Read mr hanky's M3 guide for more info on the M3, and use of homebrew and games on the DS in general. The same concepts can be applied to M3's competitor devices such as EZIV and Supercard.
but rather than passme, if you get the m3, you should get the passcard 3, keeping the same compatible products.