According to my definition of religion, Buddhism is a religion.
In my view, a religion must offer, or at least claim to offer, an immediate connection to a "sacred Transcendent" (which of course goes by many names in many different schools, philosophies, religions and spiritual systems).
If a system calls itself, or is called, a religion but it does not claim to offer contact or merger with a sacred Transcendent, then it is not a religion at all, but rather a social-uplift club, a self-help model, or some other "secular" paradigm.
This is why I do not think of, or call, secular, "atheist" or "modernist" Buddhists real Buddhists, for the simple reason that they deny that Buddhism does not offer connection to the sacred Transcendent, and worse, because they deny that such a Transcendent exists in the first place. Their "Buddhism" is really only a grab bag of materialist-reductionist redaction of Buddhistic teaching.
The Buddha himself was not an atheist - on the contrary, he believed in Gods, high and low, as well as an abundance of paraphysical heavenly and earthly entities.
Buddha only denied the existence of one single high Creator God. As to the others, he taught that Buddhahood, not Godhood, is the highest state that sentient beings can attain. Thus Buddha did not deny gods and superhuman entities. Rather, he simply depotentiated them and encouraged their worshipers to seek their own Enlightenment instead of pursuing an impossible salvation mediated by deities.
Finally, the Buddha did teach connection to a sacred Transcendent when he expanded his teaching that all things are impermanent into a teaching that all "earthly" or "Samsaric" things are impermanent, whereas Bodhi and the Dharma are the "Unborn", the "Uncreated", the "Unconditioned", and the "Lasting". Those who deny Buddha's central transcendental teaching cannot objectively call themselves Buddhists.