The filter is or is not a necessity, it depends upon the aquascape. If you have one, it should run permanently. But having said that, you do not need one, given the situation here. Provided your plants are growing, and some are fast-growing species (floating particularly), there is no need for a filter given the single betta. The plants assimilate the ammonia, and there is no nitrite or nitrate from this. The nitrifying bacteria will be there, but in the background so to speak. Water movement is the only use for the filter in a planted tank, and given the betta this is not a requirement either. So, with fast-growing surface plants, and with just a single betta, this could/should work well.
I experimented with a 10g tank some years ago, having a heater but no filter and no light; it was placed in a west-facing window. There was a group of 11 Boraras and ten pygmy cories, and it ran for a year with no issues. The light was the only real problem, since using natural daylight is less controllable than an overhead light, and some algae on the back wall had to be tolerated. But the plants were thriving, as were the fish for all I could tell.
All species of Corydoras require a group or they will be stressed, leading to further problems. A group of 10+ is required, and there is no space for this in so small a tank. Plus, this is a real risk with a male betta, as these cories do like swimming to the surface and that is the betta's territory.