Town in SE Scotland on the banks of the River Tweed on the edge of which stands Neidpath Castle (7)
I believe the answer is:
peebles
(Other definitions for peebles that I've seen before include "Scottish borders town" , "Scots Borders town" , "Scottish border town on the 4 down" , "Scots county town on the river Tweed" .)