Can I move the expansion chamber to the side of the hot water heater?
Yes, but keep the can in the same orientation as it was (or research your particular model to confirm if it can be oriented differently).

Make sure the valves in the system are configured the same (e.g. the check valve).