1997 subaru awd outback wagon (automatic)

I have a loud clunking sound in the rear end whenever I go around a sharp counter (right or left), also happens when I am backing up and turning to the right/left!!!

Something rolling around back there?
A loose jack, a loose spare tire perhaps or maybe a differential problem.

Add a possible worn strut or shock bushing.

First check that your tire pressure is okay across all four tires.

Next do all four tires match in tread depth, size, make and model?

The test to see if your AWD is the culprit is to open your hood and locate the fuse box. There is an empty fuse slot labeled FWD. Place a spare fuse into the slot. You will get an AWD warning light on the dash. Try driving around a bit and see if the clunking occurs. If no clunking it means your clutch packs are damaged.