Is it okay to ad lib when you are filming?

No, unless the director gives you permission to do so.