 This phase III trial studies the side effects and best dose of romidepsin and lenalidomide when combined with rituximab and to see how well this combination works in treating patients with B-cell non-Hodgkin lymphoma that has returned recurrent or did not respond to treatment refractory. Monoclonal antibodies, such as rituximab, may block cancer growth in different ways by targeting certain cells. Romidepsin and lenalidomide may stop the growth of cancer cells by blocking enzymes needed for cell growth. Giving rituximab together with romidepsin and lenalidomide may be a better treatment for B-cell non-Hodgkin lymphoma. 