This is possible without actually rotating the image bytes by using the ImageIO framework. You want to create an image destination with CGImageDestinationCreateWithURL, then add your image data along with its EXIF data with CGImageDestinationAddImage.
There are a couple of examples floating around on SO, like this one.
If all you want to do is display this image, then you can create a UIImage with a specified rotation from the data using:
+ (UIImage *)imageWithCGImage:(CGImageRef)imageRef scale:(CGFloat)scale orientation:(UIImageOrientation)orientation