Should I ask for a recommendation letter from a professor who I know from an industry training program?
You mentioned in a comment that you already have two referees, one of whom you have published a paper with. I imagine this person will give you a very strong reference, and that the details of your other referees may not matter so much.

You also say that the professor you worked with is in the field you are interested in, which means they are well placed to talk about your ability and potential in that field, therefore using them as a third reference is a good idea.

You can find advice about emailing them to request a reference here.