It's not free if there's any kind of expected return.
If the return is also free, yes. A smile or a thank you is free to give.
Attribution would be one thing. See ooen-source and free software licenses.
There are specific constraints on "free" in that context. For example *GPL also generally forbids providing functionality without making the source available.