In theory, if you modified the splines, it would work. Your shifting performance would suffer, likely considerably, but it would 'work'. I have a 8 spd bike (1x8) that is my beater commuter bike and when my chainring wore out, I simply flipped it and it mated to a new chain no problem. I have also run front chainrings that have had no ramps or pins, and it will shift, but it is quite sluggish. I have never tried it on the rear as you would have to take the time to file down the one big spline so that the cassette would fit on the freehub body. I suspect it would work best with friction shifting, as it's a bit easier to "overshift" to help it changes gears.
Try it, and let us know how it works.