Yes. Closer to the highway is traditionally more expensive, because the traveler will not usually go far from convenience to get cheaper gas. The markup is not from the dealer's costs, but because their prey is paying for the convenience.
I still don't understand what you mean by 'market price,' though. If the city is selling gas comparable to the neighboring city's convenience stores, is that at or under the market price?
Imagine you drive through a town which has two gas stations on opposite corners. If you are between the two stations, your cost to do business with either is the same. This means you can ascertain the market price for gasoline by looking left and looking right, and reading the signs. If you want to include nearby towns in your market, you will need to include the price of travel, which is a "market cost".
Now, imagine someone sees the gasoline in your town is selling for 20 cents more than a nearby town. He does some calculating and determines he can buy some property, make improvements and open a gas station which can sell gas for 18 cents more than in a nearby town. The 2 cent difference will insure a substantial market share, because it costs no more to get to his station than the other two. You now have a market with 3 gas sellers and the same number of buyers. This lowers the market price, simply by the average. The other sellers may lower prices to retain market share, but if the number of sellers does not increase, everyone makes a little less money. That is the reality of markets.
Now, imagine if someone can open a gas station without any of the expenses of buying property and building a station. They have access to a large fund of money which is not their money, but have been left in charge of this fund, so they can use it to purchase fuel and pay any related labor and maintenance costs. Without having the burden of rent, payroll and other expenses, they can sell gasoline for 2 cents more than the nearby town. Once again, market share will be captured by the low cost retailer. If the number of buyers does not increase, once again, everyone makes less money.
This is a problem for the original gas sellers. If they cannot pay their bills, they will have to close. It's not a problem for the station without expenses. They have an endless income which is not related to the sale of gasoline. This endless supply actually comes from you.
The idea of government buying essential commodities and distributing them at very low cost to the public certainly has some merits to consider. It's been tried before with varying results. In the old Soviet Union, bread was baked and sold by state owned bakeries and the price was fixed. Pig farmers found it more economical to buy bread and feed it to their pigs, rather than grow grain for pig feed. This meant the cost of a pig to the economy was not actually reflected in its sale price, but it kept the price of a ham sandwich down.
It comes down to this. A town with only two gas stations and a high price of gas needs a third gas station. If the government starts selling gas at a low price(cheaper than you would pay at the other two station), no one has any reason to open a third station. If that is what the people want, they have a chance to say so at the next election. When it comes time for property tax assessments, they'll need to remember that a little of what they pay goes to make life a little cheaper for the folks who drive cars.