With the hosts chasing 120 for victory on the final day at Junction Oval, former Test batters Marcus Harris and Peter Handscomb went on the attack in an unbroken 103-run third-wicket stand after an early scare.
Harris and Handscomb both finished unbeaten on 56.
A second Peter Handscomb half-century of the match has helped Victoria beat WA. (Joel Carrett/AAP PHOTOS)
Rocchiccioli bowled Ashley Chandrasinghe and Campbell Kellaway with his first two deliveries to have the hosts 2-19.
Two days earlier he had Peter Siddle caught by Cameron Bancroft with the last ball of the first innings.
Rocchiccioli's feat was reminiscent of one by former West Indies pace bowler Courtney Walsh against Australia at the Gabba in 1988 when he took the last wicket to fall in the first innings and then snared two with his opening deliveries in the second.
The door was ajar for an unlikely Western Australia win after Rocchiccioli's heroics but Handscomb was having none of that. The skipper negotiated the hat-trick delivery and went on the attack.
Harris was a willing accomplice and made sure there was no miracle win for the three-time reigning Shield champions.
WA were dismissed before lunch for 325. The key wicket was tailender Brody Couch (18) who had stayed with centurion Joel Curtis for 36 overs in a stoic 103-ball innings.
Curtis remained unbeaten on a brilliant and defiant 119 to add to the list of wicketkeepers in fine fettle with the bat in Australian domestic cricket.
Spinner and last man in Ashton Agar epitomised the fight in the visitors when he came out to bat with an AC joint injury to his left shoulder.
Brave stuff by Ashton Agar who batted one-handed due to a shoulder injury to add 15 runs for the 10th wicket 💪 — cricket.com.au (@cricketcomau) #SheffieldShield pic.twitter.com/WZQ3pqw9qZNovember 18, 2024
Agar, who had his arm in a sling the day before, could hardly hold the bat with his bottom hand and didn't trouble the scorers but his team-first attitude was there for all to see.
Allrounder Sam Elliott took four wickets in another impressive display.
It was the bowlers who set the win up for Victoria with paceman Fergus O'Neill taking six for the match and spinner Todd Murphy chiming in with four first-innings wickets to help dismiss Western Australia for 167.