Bnei Noach cannot "keep" a mitzvah as a mitzvah.
All of humanity including bnei Yisrael were commanded in the sheva mitzvot bnei Noach(the seven laws of Noah). That doesn't mean they didn't do things that were similar or maybe even exactly like mitzvot today. Things started to change with Avraham(Nedarim 31) and no longer considered bnei Noach.
For instance, Avraham instituted and did the Shachris morning prayer, but was not commanded to him to do or to pray.
I can't remember the exact citation, but it's similar to Hilchot Melachim 10:10, where it says a (shomer sheva mitzvot)ben Noach can do any mitzvah he wants even though he's not commanded, so I can only assume this is the case with the most ger tzedek of them all: Avraham.
Also, from a really mind-trippy view, because the Torah was not given yet, Sanhedrin 56b states that at the waters of Marah is where bnei Yisrael received the sheva mitzvot. What blows my mind is that we learn about this through the Torah, so anything we learn from the Torah before Torah gets tricky. It's kind of like saying, "Did anything exist before Torah".