Yes, you may subscribe to Ahrefs services for 1 month or any number of months you wish to.
Your subscription can be upgraded, downgraded or cancelled at any time. There is no fixed period you have to be subscribed.
It is to be noted, though, that at Ahrefs, we have an automated recurring billing system: at the end of each paid period, your subscription gets automatically extended for the next period.
Thus, if you plan to subscribe for a month only, be sure to stop recurring billing for your subscription as soon as you subscribe.
You may do that from the Subscription Plan tab of your personal account at Ahrefs. Check this Help article for more detailed instructions.