I'm curious to hear if there's a more elegant solution, but I feel like brute force may be the best.
Basically try to go down all the paths recursively, under each possible rotation orientation - assuming you only have a few rotation angles.
Something like, if you reach a spot you can't continue to path through, but there is a gap, try rotating to fit through. If you can't and the stack unwinds so to speak, unwind until you are at a place where the piece can be rotated. Rotate the piece and continue to recurse out.
Continue until you get to the destination or until you've tried all available paths at all rotation angles.
If your map is static (doesn't move, or doesn't move often), you could probably do some of this brute force as a preprocessing step so that you'd already have knowledge of how a piece had to be rotated to go down a specific path (or which rotations are valid maybe as a bit mask). That would make it more efficient at runtime.