That's pretty risky. I have seen it done before in zoos but most people don't have tanks large enough to try this. A turtle would have no problem taking a nip out of a sleeping gar.
Pine Knoll Aquarium in North Carolina has Longnose gars mixed with Snappers in a large setup. That gar was over 4 feet long!
Possible, but risky. Turtles like taking bites out of fish just "because". And gar are often just sitting still, so they would make a good target for a turtle, especially in such a small tank.