SkQuery has this effect:
code_language.skript:
tame %entity% to %player%
To kill it after a set amount of time, you have a few options. You could just store it in a temp variable, add a 'wait 5 minutes' (or however long you want), then kill it, like this:
code_language.skript:
loop 2 times:
spawn 1 wolf 3 meters above player's location
tame the last spawned entity to the player
set {_wolf%loop-number%} to the last spawned entity
wait 5 minutes
kill {_wolf1}
kill {_wolf2}
This is the most straightforward method, but has the issues of not working when used right before a restart, or if the wolves are unloaded (i.e. the player teleports away from them), or even just if another plugin (or one of your own other scripts) intercepts the death event and stops it for some reason.
You could also just 'apply wither to the last spawned entity' to make it naturally decay, but that'll make it die more quickly (and more obviously, since players can see it taking damage) unless you change its max health to make the wither take long to kill it (which you probably don't want to do). However, the wither effect does have the added benefit of not caring about chunk unloads and reloads and server restarts -- those wolves WILL die after they're loaded for a certain amount of time, as vanilla mechanics are pretty trustworthy. You could also intercept wolf damage events by wither and reroute the damage to a health subtraction to make the damage animation not visible, which would help/
You could also do something in between these methods, by tagging the wolves somehow, and then having a loop that runs periodically, loops loaded wolves, and subtracts from their variable/tag. I can go more into this if you want as if it's done right it has the benefits of both methods, but it's more complicated than is probably necessary (and laggier).
But as you can see, working with entities is a total bitch when accounting for server restarts, chunk unloading, and more.