There's a confusing terminology overload here: the file is marked as read-only on the filesystem. TFS uses the term locked to indicate that the file is checked-out by a given user and cannot be checked-out or checked-in by other users. The file is not locked, but it is read-only.
Team Foundation Server - when you're using a server workspace - marks the files as read-only when they are checked-in to the server and sets then to writable when the files are checked-out.
It sounds like you do not want this file in source control anyway. You should delete these files from source control (but not from your local machine). In the future, you should carefully review your pending changes so you do not add files that you are not interested in having in source control.