There is no requirement that you have to reside in your home for any amount of time and nothing the stops you from paying your FHA loan off early, so it is possible to use an FHA loan to buy a house and quickly sell it.
However, you cannot use an FHA loan to buy a property that is being resold within 90 days of the prior purchase. And if it has been 91-180 days since the prior purchase, you will need to pay for a second appraisal if the sales price is more than 100% of the price paid by the prior buyer.
In other words, you can use an FHA loan to buy a property that you want to flip, but there are restrictions around using an FHA loan to buy a property that has been flipped.