There is absolutely no problem for you to ride with a pacemaker.
You may have heart block, which means your heart slows down to the point you may faint.
A pacemaker is a small device placed below your collarbone at the front of your chest.
It has a wire that goes into a vein by the collarbone and runs down into your heart where it is secured.
It does nothing until your heart slows down, then it will kick in, you probably won’t notice.
It’s just a safety net.
Give it a few weeks to bed in, stitches heal etc.
After that, live normally.
I’ve looked after a marathon xc rider who has one.
Hopefully it wont come to a pacemaker, but if it does, then don’t worry too much, you’ll be fine.