Yes, it is under compression and bending at the same time. Those two stresses are computed independently. The combined stress from the axial direct stress and the bending stress is unsurprisingly called Combined Stress on the Beam Tool. Refer to the definitions below. Referring to Wenlong's excellent diagram using tension, the Maximum Combined stress will be reported from the top of the beam.

But if the axial force was changed to compression, then the Minimum combined stress would be on the bottom of the beam.

Use the ANSYS Help and in the Mechanical User's Guide, you can look up the Beam Tool and find these definitions.

Direct Stress: The stress component due to the axial load encountered in a beam element.

Minimum Bending Stress: From any bending loads a bending moment in both the local Y and Z directions will arise. This leads to the following four bending stresses: Y bending stress on top/bottom and Z bending stress on top/bottom. Minimum Bending Stress is the minimum of these four bending stresses.

Maximum Bending Stress: The maximum of the four bending stresses described under Minimum Bending Stress.

Minimum Combined Stress: The linear combination of the Direct Stress and the Minimum Bending Stress.

Maximum Combined Stress: The linear combination of the Direct Stress and the Maximum Bending Stress.