The "standard" way to graft an apple tree onto a rootstock requires that the stock and the scion are both the same diameter, usually about 1/4 inch (6mm).
If the trunk is now 6 inches diameter you probably can't see where the original graft was made, but it will be within a few inches of ground level.
There is no way you could chop down a 6 inch diameter trunk and somehow graft another tree directly on top of it. The only part of the trunk which is "actively alive" is a ring just beneath the bark. The heartwood is just a wooden post holding up the tree.
You could make some bud grafts of your new variety either onto the trunk or the lower branches, and then cut down the old tree in a few years time when the grafts have grown into something tree-sized.
See https://youtu.be/XXltshqi9AM for how to make a bud graft. The process is the same whatever the diameter of the old tree branch.
If you cut the old tree down too soon, it is likely to produce a lot suckers or "water shoots" from the roots which is not what you want.
Note, you will not get any fruit from the grafted wood for three or four years. It will probably take longer than buying a new tree, because what you buy has been already growing in the nursery for one or two years after it was grafted.