This randomized phase I/II trial studies the side effects and the best dose of temsirolimus when given together with bortezomib, rituximab, and dexamethasone and to see how well they work compared to bortezomib, rituximab, and dexamethasone alone in treating patients with untreated or relapsed Waldenstrom macroglobulinemia or relapsed or refractory mantle cell or follicular lymphoma. Bortezomib and temsirolimus may stop the growth of cancer cells by blocking some of the enzymes needed for cell growth. Bortezomib may also stop the growth of cancer cells by blocking blood flow to the tumor. Monoclonal antibodies, such as rituximab, can block cancer growth in difference ways. Some block the ability of cancer cells to grow and spread. Others find cancer cells and help kill them or carry cancer-killing substances to them. Drugs used in chemotherapy, such as dexamethasone, work in different ways to stop the growth of cancer cells, either by killing the cells or by stopping them from dividing. It is not yet known whether bortezomib, rituximab, and dexamethasone are more effective with temsirolimus in treating non-Hodgkin lymphoma.