For sacred hearts, the weapon requirements change very suddenly. What happens if you have a character on the sacred heart track who does not have enough magic stat to wield their stage 4 weapon?

Can part of the stats that they gain from ascending to stage 4 be used to make up the difference?

DraconicFeline
This question belongs in the battle FAQ, and I believe has already been answered there if I'm following your question correctly. The answer will be hosted there for future reference.

"Can I still buy my weapon even if I haven't reached the requirements to use it yet?
Yes! You have to buy the weapon in order to grow, but you don't have to worry about not being able to use it. Sometimes characters just need a couple more stat points before they've reached the reqs and that's ok! We won't hold a character back from growing just because they need to grab just a couple more stats."

If an owner doesn't plan ahead and doesn't have enough stats to use their weapon, then they cannot use it. There is plenty of time and opportunity to make sure there are enough stats in the appropriate areas.