You absolutely can have an anemone in less than a 40g tank but I'd ask which anemone you are wanting to give a better recommendation.
For example, in my 29 gallon biocube I had 3 rock flower anemones, 1 bubble tip anemone and 2 maxi mini anemones.
Smaller water volumes can be less stable but they are also infinitely easier to maintain (10% water change on a 20gallon vs 10% water change on a 100gallon) and will be much easier to move when needed.
Due to a nano being more sensitive to small changes, make sure you get an auto top off to keep salinity stable. Stay on top of ~10% water changes weekly. I'm not saying that there aren't other ways to accomplish stability but my tank never looked bad when I was staying on top of routine water changes. Especially on my biocube. I started out doing a 4g water change every week and I didn't miss a beat for a year +. Then I started getting more relaxed and stopped being on top of them and that's when algae issues started to arise.
Also, make sure you are patient. Don't rush to add chemicals to solve a problem. Good things don't happen fast but bad things do.
As to your actual question, there isn't a size that is best but I would do something like an innovative marine 20 - 40 gallon tank. The all in ones are handy to keep things looking tidy but also keeping things like heaters from sitting in your tank. You do lose some utility to add extra gear (different reactors, scrubbers dosers etc) but it isn't needed, especially on a smaller tank.