It is difficult to see what you are describing. Did you remove the nuts that hold the wheel to the back of the bike frame? Is this when you found the spacer?
You are probably right in that this spacer goes on the drive or cog side of the axle. When you put it all back together be sure that the wheel spins ok and that it is not loose.