Can you give us a bit more information?
What is the charge controller? Does it have a load output terminal? What is the solar panel wattage? How much load do you want to run on the inverter? For how long?
Yes, you can connect an inverter to the battery and it will give you power. The reason for the other questions is to see how long this might work and if you might damage the battery.
The solar panel provides the energy. Depending on where you are, the time of year, and weather you can figure out how much energy is actually usable. I am in So Cal, and on average at this time of year, we can still get over 4 "sun hours" which basically means that here in early November, I can get 400 watt hours per day from a 100 watt solar panel. Sun hours x Panel watts = Watt Hours of energy. If you have a 100 watt solar panel, a 300 watt inverter, and want to run a 200 watt power drill for an hour, no problem. Want to keep a refrigerator running all night, nope. You will need more solar panel. You probably would also need more battery. The charge controller takes the energy from the solar panel and charges the battery and should stop the charge to prevent overcharging. If the controller has a load terminal, it may also have a cut off to keep you from pulling the battery too low. Pulling a battery below safe levels will damage the cells and greatly reduce capacity. The battery is what actually is running the loads. In your case it is just the fence shocker now. It should have a spec on it for how much power it uses in a day. As long as the solar panel is making more watt hours than you use, it all works fine. When you add the inverter, you will pull more from the battery. If it is still less than the solar makes, you are fine. You may even get away with using a bit more one day, as long as it can get it back the next day. If you need a constant load, then you need to make sure the solar can keep up. If you are only going to use it when the sun is up, then the battery size is not too important, but if you want to use the power over night, then the battery needs to store all of the power while the sun is up for you to use when the sun is down.
So if you have an idea how much power you need and when, and what the solar can produce, then we can help you figure out what can work and what may need to be upgraded.