My question is that why the direction of current inside a battery is different than that of outside battery?Can someone explain how current is even carried inside a battery because free electrons aren't released inside the electrolyte they move through the wire than how even there is current inside a battery? If there is some conceptual error in my knowledge of electricity than please help me out?
An electrolyte consists of ions which are positively charged atoms stripped off of their electrons. Current can travel through these ions because one of the ions can move from the cathode of the battery to the anode of the battery just like electrons do in case of a metallic wire.
I suggest you read this:
Also direction of electricity is opposite inside a cell because the current has to complete the loop and it can't just reverse it's direction abruptly.
The direction of the current inside the battery is the same as outside the battery. In other words, the current is moving in the same direction everywhere in the loop.
Conceptually, an electron traveling through the wire and entering the battery through the positive terminal, neutralizes a positive ion in the electrolyte and a freed up negative ion moves to the negative terminal, pushing another electron into the wire.