Well this is possible but not in a very clean way, you can have a procedure check all the time if an anvil is on top of a block of stone and then turn it into sand. (On player tick update or On world tick update should work) And if you want it to be not turn all stone under an anvil to sand constantly even when they aren't falling then maybe using some boolean variable in some way could solve that.
The clean way to do it is using custom stone like let's say you right click a stone with a "stone cracker" which would replace the stone with your custom "cracked stone" and then have it check "When neighboring block changes" and if there is an anvil on top of it when that happened.
Well this is possible but not in a very clean way, you can have a procedure check all the time if an anvil is on top of a block of stone and then turn it into sand. (On player tick update or On world tick update should work) And if you want it to be not turn all stone under an anvil to sand constantly even when they aren't falling then maybe using some boolean variable in some way could solve that.
The clean way to do it is using custom stone like let's say you right click a stone with a "stone cracker" which would replace the stone with your custom "cracked stone" and then have it check "When neighboring block changes" and if there is an anvil on top of it when that happened.