A relative of mine, a very keen regular walker, had a quadruple heart bypass at the Heath hospital in Cardiff, back in 1993.
He took things very gently for the first few months, but found that the regular gentle exercise, benefitted his recovery, and the Lord only called it a day, when he was aged 93, so a good innings.
By what i can remember, he was not afraid, or overwhelmed by his sudden serious illness, actually he was over eager to return to his hillwalking, but was advised by the hospital, to take it easy, and gently ease himself back into full health.
The majority of us, are not physically active, you only have to look at the girth of most people, to realise this.
Any form of exercise is beneficial to ones health, and i very much doubt any Gp would discourage a gentle return to regular exercise, after a heart attack.
Just use a bit of common sense, and slowly return to walking.
Just imagine how many people, who once they have a heart attack, either a major or minor one, feel scared or apprehensive of returning to a past time as beneficial as hill walking.
Seek professional advice, but moderate exercise is encouraged by the majority of health experts, its just how you go about it.