I live in a place with no easy access to an oven. If I wanted to bake a cake, could I do this with an appliance like this?
In general, yes. But it's going to take a bit of effort and monitoring.
Your results may not be ideal (in particular don't expect the highest rising cake or the most even doneness), but it is possible to bake a cake in something like that. There are three main issues:
The device you linked looks like it doesn't have temperature control. It looks like it just turns elements on the bottom and/or top on and off. So, you'll need to regulate the power yourself, turning the power off before the oven heats up too much and turning it back on when it starts to cool down. If you're not experienced with baking without a built-in oven thermometer, you might want to try to pick up a cheap thermometer which you might be able to fit inside and help regulate temperature.
If there are electric heating elements on the top and bottom, they may be much closer to the cake than they would be in a larger oven. That could lead to excess browning on the surface and/or the bottom of the cake. You may need to bake at a lower effective temperature to avoid browning or even burning the crust.
The heat produced will be more uneven in general than a large oven. That may interfere with rising or doneness in the cake. There's not much you can do about that other than monitoring and making sure the cake is cooked through before removing.
I personally wouldn't recommend trying this unless you already have experience baking/cooking with this appliance. Cakes are bound to be more sensitive to things like temperature fluctuations and radiant heat than many other things you might cook in such an appliance. But if it's your only option, it may be workable.
I would suggest very thin, like you would use for a jelly roll. If you want a thicker cake, build it up out of multiple layers. Use parchment paper, or possibly wax paper and make it thin enough that it cooks in a short time and monitor it. When you remove it because the top has browned, turn it over and remove the parchment. If the bottom needs more time, return it to the toaster over with that side exposed for a short time. When browned, the center should hopefully also be adequately cooked. Repeat until you have enough layers to build the thickness you want.
I would think you would have a better chance of success the lighter the cake batter is, a denser batter may have more trouble heating the center before the outside is done and you will likely have more issues the higher the temp it toasts at. With no temperature control it may be like attempting to bake under a broiler. With practice you may succeed, but it will likely not be easy. If you have one available, you may be better off researching cake in a mug microwave techniques.