A year plus later and with the enormous benefit of reconstructed data (SPICE kernels), the exact maneuvers of the spacecraft can be visualized.
The PDS Label for the MRO data product gives the following start & stop times:
/* All xxx_TIME values are referenced to UTC. */
GROUP = TIME_PARAMETERS
/* Time when the observation first started */
MRO:OBSERVATION_START_TIME = 2021-02-18T20:42:31.657
/* Time of the first image line */
START_TIME = 2021-02-18T20:42:32.368 <- START
SPACECRAFT_CLOCK_START_COUNT = "1298148206:43887"
/* Time of the last image line */
STOP_TIME = 2021-02-18T20:43:02.881 <- STOP
SPACECRAFT_CLOCK_STOP_COUNT = "1298148237:11987"
/* Time when this RDR product was created */
PRODUCT_CREATION_TIME = 2021-02-25T00:45:18
END_GROUP = TIME_PARAMETERS
The high gain antenna (HGA) must maintain Earth pointing as for Mars 2020 (unlike MSL) MRO is the "primary telecom link from atmospheric entry to rover landing" [1]. MRO & MAVEN are the primary links, but MRO achieves near real-time transmission in a "pseudo bent pipe" mode. MAVEN records open loop and relays back to Earth sometime later.
MRO's nominal attitude & spacecraft fixed reference frame is +X in direction of flight, +Z "down" (also the view direction for HiRISE), +Y completes the right hand cross product. The HiRISE CCDs scan in the X direction. This is taken from MRO's latest frames kernel (fk) & HiRISE instrument kernel (ik). Here is an animation I cooked up showing this nominal attitude just prior to Mars 2020's EDL:
(Personal work, data from NAIF, RGB -> XYZ, grey -> nadir)
It's tough to see the blue +Z line as it essentially overlaps the grey nadir line in MRO's nominal attitude. Both the solar arrays and the HGA on MRO have an inner and outer gimbal to maintain their own pointing (towards the Sun & Earth) distinct from the spacecraft bus attitude. These gimbals mean that any "off-nominal" MRO orientation during the EDL event is (almost certainly) solely for the purpose of taking the picture (including any potential momentum management schemes before/after the picture).
Contrary to at least my assumptions, MRO is out of nominal attitude for nearly half of its orbit and orienting for the HiRISE observation takes several minutes:
(Personal work, data from NAIF, RGB -> XYZ, grey -> nadir, yellow dashed -> towards M2020)
Here are two plots of the orientation angles during the sequence:

(Personal work, data from NAIF)
In the rotating frame, left, the nominal attitude is seen as yaw, pitch, roll angles of ~0. We see MRO pitch up, roll left (negative roll), and yaw right (positive yaw). The spacecraft "over pitches" and actually pitches down during imaging, though still "up" from nominal attitude. During the imaging, the spacecraft brings the yaw angle back to near zero, as @DavidHammen explains is important.
I will point out though that Mars 2020 is actually ahead and to the right of MRO when the image is taken as seen in this wider view animation:
(Personal work, data from NAIF, RGB -> XYZ, grey -> nadir)
The prior plots show some motion during the imaging, which can be seen in the image itself. These artifacts of the spacecraft's maneuvering in the full image can be seen at the start (bottom) of the image:

(NASA/JPL/University of Arizona)
See the "squiggliness" on the right edge.
References:
- Abilleira, F. et al. "Mars 2020 mission design and navigation overview," (2019) (JPL TRS link)
Edit:
Interestingly, the Perseverance rover (and descent stage) are almost not in the zoomed in image. In the full size image (18048 px by 62300 px!), the backshell and parachute are located at ~64% of the vertical (scan/pushbroom) dimension. This means that the backshell and parachute are "imaged" approximately 64% of the way through the observation timewise. When Mars 2020's inertial velocity is plotted over the observation period:

(Personal work, data from NAIF, vertical line indicates ~64% of way through observation time)
We see that the vehicle is imaged almost exactly when the descent stage and rover separate from the backshell (see the smooth increase in velocity).
Though it would be cool to see a free flying Perseverance, I can't see anything that looks like a descent stage in the full resolution image:

(NASA/JPL/University of Arizona)