Yes, an executor of a will can also be a beneficiary. In fact, this is very common. For example, you might name your children or siblings as executors of your will and also wish to leave them something in your will when you pass away.
The only people who can’t be beneficiaries in your will are the people who witnessed the will signing.