Sure you can. You won't be able to see the fish from the side and enjoy the beauty of its fins, but the fish will be OK.
I have kept Bettas in a wide variety of housing over the years. When I actively raised , I would occasionally find males that were more like the wild variety than the big-finned ones you see in pet shops. I put these "wild, "shorter-finned males in a small pond I had outdoors, into big birdbaths, and into water containers I kept around the yard to provide water for birds or to "age" water (and grow protists and rotifers) for use in aquaria used to grow baby fish. These fascinating hunters kept all these outdoor water containers free of mosquito larvae and grew quite plump over the summer with very little feeding on my part! I couldn't see their fins, but I could hear them "pop" the surface when they grabbed a bug or snapped up a mosquito landing on the water to lay eggs. Once summer was over, they all came inside and were placed into small aquaria and other containers.
If you were going to keep the bucket indoors, be sure to add some sprigs of plant and maybe a couple of other small floating objects to provide interest for the fish. they love to hunt, so the provision of floating sprigs of plant and such gives them structure around which they can actively hunt. This encourages natural behavior and allows you to see the animal behave as they do in nature.