I need to redirect the user to a form which is on a different page after he clicks edit. So what is the best practise here, to use the pencil icon or edit button or anything else where it is clear that the user will be redirected to a different screen without getting surprised
Both. If you have to choose, use text.
Icons are quicker when searching for a button in an interface if the user remembers what to look for, but can often be unclear as it can be interpreted in different ways. Text is always a lot clearer but takes slightly more time to find the button in an interface. I personally think this is negligible and text labels make an interface much easier to use for new users.