The gemara says that one of the aveiros that eisav commited on the day that avrohom died is that he had relations with a girl who had eirusin but not ne'suin. Tosafos asks that the halachic status of eirusin didn't exist prior to matan torah, when marriage was achieved by consummating the marriage with the intent on staying together which is tantamount to our ne'suin. How can eisav be responsible for this aveira, since she was technically a woman who was still permitted to all? Tosafos answers that although they weren't commanded against taking a girl who was set aside and engaged to someone else, it is still disgusting to do. Meaning, the concept of an aveirah prior to matan torah was not so much about specific actions that are forbidden, since at the time there were a very limited number of specific actions that were forbidden. Rather, the concept of an aveira was not to do things that are considered repulsive.
Similarly we find that mitzvos prior to matan torah were not specific activities that we keep after the torah was given. Although the gemara in yoma tells us that Avrohom kept the entire torah, his claim to fame was not the keeping of the torah, rather the acts of kindness with others that is recognized as inherent good even without a formal mitzvah. The maharatz chiyus (chulin 16a) points out that the gemara attempts to learn out a specific halacha of shechita such as the requirement to use something that is detached from the ground, from the fact that Avrohom took a knife to the akeidah. The gemara pushes this off and says that the reason that Avrohom brought a knife was due to his zerizus and concern that he would not find a proper utensil with which to carry out Hashem's command. From this the maharatz chiyus points out that we can only learn from Avrohom characteristics that are inherently good such as zerizus, but cannot learn from his actions specific halachos since it was prior to matan torah (as rashi in avoda zara 3a writes, avrohom had the status of a ben no'ach). Although Avrohom may have kept the entire torah, we cannot tell from his actions that this would be a torah requirement. It is only once we know from elsewhere that the torah would demand or prohibit something can we then explain an action of Avrohom based on that.
In short, both in regard to aveiros and in regard to mitzvos, prior to matan torah there were very few specific commandments. Yet, things that are perceived as good such as the trait of zerizus is considered a mitzvah that we can learn from avrohom, and things that are perceived as bad such as taking a woman who is already set aside fro another is deemed an aveirah.