If it's an M39 lens made for use with SLRs (and there were a few) then you can go via an M39 -> M42 adapter followed by an M42 -> EOS adapter (if you can't find a direct M39 -> EOS). However if you look on eBay (see link below) you'll see lots of M39 -> EOS adapters.

Most M39 lenses made for rangefinders have way too short a back focus distance to use on an EOS (or any other) SLR camera and can only be used for macro work. Whether you will be able to reach infinity focus is unsure, but if it's a lens designed for SLR use, you should be able to get pretty close to infinity focus.