Short answer: with difficulty.
Ballet flats are a particular shoe design inspired by the shoes used by ballet dancers. By design these shoes are very minimalist. They do very little to the foot except cover it and come in a wide range of attractive designs. They also tend to be very snug fitting to help them stay on the foot. There is nothing inherently wrong with these types of shoes provided that are fitted properly and are of the right size for the user.
The issue with these minimalist types of footwear is if there is a foot problem that needs some sort of arch support, even on a temporary basis. The main sorts of problems that this might be needed are especially if you are on your feet all day and the feet and legs get very tired. Due to the minimalist nature of the design and the typically snug fit of the footwear, there is not going to be a lot of room in the shoes to do much. Clinically, choices or options can be limited if you spend most of your time in this type of footwear. There is simply no way that a typical foot orthotic is going to fit into these types of shoe. Sometimes a cut down foot orthotic might be able to fit in the shoe. Other times the problem can be managed by changing to a different type of footwear that foot orthotics can easily be used in for a period of time until the problem gets better. It is always best to see a podiatrist and discuss the options that you have if you really do need some sort of support and if it can be accommodated in your ballet flats style footwear.
Arch Support in Ballet Flats
There are a very limited number of ballet flats on the market that do have arch support type designs built into them. However, they are hard to find and may not be suitable for you. There are the instant arches types of self adhesive pads that can be stuck in the shoe to give some sort of support and this is often a good compromise if that is what is needed to deal with your problem. We do use them from time to time when there is no other more suitable workaround to getting support into a ballet flat type of shoe.
Long answer: it can be done, but there has to be compromises made.