Yes, and it sounds delicious. Icing usually goes on the outside, but can be used as a filling, too. I assume that the cake has layers. Is that the right image?
But one cannot bake a cake with icing in the middle - it would melt and end up as a sticky mess in the bottom of the cake tin. One must bake the cake and then put icing in the middle (weird, but possible).
You can make a cake with icing in the middle, if you must - but what's wrong with buttercream or lemon curd?