Will rest cure Achilles tendonitis or do I need surgery?

Relative rest. Surgery would be an option if you were dealing with an achilles tear, but for tendinitis, no.
Achilles tendinitis. Tendinitis is an inflammatory condition that responds to relative rest, ice, antiinflammatories. If present for greater than 6 weeks probably represents tendinosis or disease of the tendon. If tendinosis effects tendon between calf and heel usually responds to an eccentric loading program. If at the heel usually doesn't respond. Other nonsurgical options: gassion massage, prolotherapy, prp.
Rest. Will certainly allow it to heal. However, the underlying cause needs to be addressed to prevent recurrence.
Conservative care. Rest and immobilization is a good idea. Stretching and physical therapy is part of the treatment paradigm as well. Tendonitis by the way is an inflammation of a tendon so unless there is some form of tear surgery would not even be indicated.
Usually. Conservative measures, such as rest, stretching, strengthening, etc. Are usually all that is needed to treat tendonitis (achilles or otherwise.) surgery is a treatment of last resort and rarely, if ever, needed for tendonitis.
It will help. Rest will help. Surgery is usua;y not needed unless there is a tear.