You are able to trade a cartographer villager a lodestone compass.
You can summon a villager with a compass trade by using the following command to make reproducing this much easier.
/summon minecraft:villager ~ ~ ~ {NoAI:1b,Offers:{Recipes:[{buy:{id:"minecraft:compass",Count:1b},sell:{id:"minecraft:emerald",Count:1b,maxUses:9999999}}]}}
Attachments
Comments

Yeah. It's still technically a compass. It is just attached to a loadstone, instead of spawn.

It's a "Lodestone Compass" not a "Compass". [Not WAI]
Can confirm in 21w03a.
Can confirm in 21w06a.
Can confirm in 21w07a.
Can confirm in 1.17.1.
Can confirm in 1.18.1. You can summon a villager with a compass trade by using the following command to make reproducing this much easier.
/summon minecraft:villager ~ ~ ~ {NoAI:1b,Offers:{Recipes:[{buy:{id:"minecraft:compass",Count:1b},sell:{id:"minecraft:emerald",Count:1b,maxUses:9999999}}]}}
Can confirm in 1.18.2 and 22w15a.
Can confirm in 1.19.
[media]Can confirm in 1.19.2.

Can confirm in 1.21.
It's still a compass, it's not like you're deleting the lodestone, pretty sure this is WAI.