Question about datapack loading

Are there ways to push a pack to a world? Like when you join the world, it auto-equips, and when you leave the world, it auto-unequips? I've seen mini-map worlds do it before without mods or servers.
Continue to help post