Replacing sink trap with a flexible one?
You sure can attach the plastic flex to the metal. Just buy a complete trap kit and it will have all the nuts, pipe and washers needed to switch it out.

Another possible option is to try to twist the wall side of the pipe a little in the direction you need.