AutoCAD allows you to create and edit 3D models using 3D solid, surface, and mesh objects.
Solid modeling allows you to create 3D solids by extruding and revolving 2D entities, and these models can then be easily edited using union, subtraction, and intersection.
Using the UCS (User Coordinate System), you can define the desired XY work plane in 3D space and work within it. In particular, the Face (F) option in the UCS command allows you to align the UCS with the face of a 3D object.
In this video, a 3D solid model is created from a 2D flange entity.