My requirement is while clicking lookup button for account selection. It should show only the existing account or user cannot change the current populating account. If a user selects another account it should throw error. How can we achieve this?
The only way to do this is to make the field read-only on the page layout. This will allow the account they clicked the button on to be selected, but will not allow it to be changed. There is no other way in the standard user interface to enforce the behavior you're looking for. If the field is not read-only, they can change the value. A validation rule/trigger/etc won't help, because you cannot detect what the original account was, or if they changed the value. The only other alternative is to write your own Visualforce page for the New Opportunity page.