Catalysis of the transfer of an ion from one side of a membrane to the other up the solute's concentration gradient. This is carried out by binding the solute and undergoing a series of conformational changes. Transport works equally well in either direction.