“Guard your step.” The Hebrew is more idiomatic, literally, “Guard your foot.” This is perhaps more awkward in English than our idiom, “watch your step,” but it is not saying “watch your step” in the sense of not tripping over something. To “guard” your step was to beware of entering the presence of God without giving proper thought to what you were doing and why you were there.
“Go near to listen rather than to offer the sacrifice of fools.” In this case, “the sacrifice of fools” is the sacrifice and vow that a fool would make. The whole context, Ecclesiastes 5:1-6, is about words and vows. The fool makes a vow without counting the cost, and then cannot pay (Ecc. 5:4), and has to tell the messenger that the vow was a mistake, which makes God angry and leads to what the vow was made for in the first place being destroyed. The wise thing for people to do when in the house of God (the Temple) is to listen first then make commitments.