Are there ways you can legally protect your rights to an idea to enhance a product for an existing company that you don't work for?

You could apply for a patent. Contact the US Patent Ofiice for information on how.