This phase II trial studies how well carfilzomib with or without rituximab work in treating patients with Waldenstrom macroglobulinemia or marginal zone lymphoma that is previously untreated, has come back, or does not respond to treatment. Carfilzomib may stop the growth of cancer cells by blocking some of the enzymes needed for cell growth. Monoclonal antibodies, such as rituximab, may interfere with the ability of cancer cells to grow and spread. Giving carfilzomib alone when disease is responding or with rituximab when disease is not responding may work better in treating patients with Waldenstrom macroglobulinemia or marginal zone lymphoma.