Is there a way to find out the booking class of a past flight, only having your name, flight number and booking reference/ticket number?
The airline may have a mechanism to request a receipt after you travel. United, for example, has a form you can fill out and they'll send you back a receipt within two weeks. If your airline doesn't have an online form for this, you can contact them and ask if there is any such process. You might also have a copy in your email if you booked the tickets yourself.
Another place to look is your frequent flyer account, if you have one. Since mileage earning sometimes depends on the booking class, it may be displayed on your statement. I know that United shows it on their statements (see this example, which lists the flight number and G-class), as does Ethiad (see this example, which lists the booking class after the / for each flight).