Can a NBA team buy a draft pick for cash from another nba team?
It is legal in the NBA CBA to trade a player for cash (see pages 169-173). Larry Coon's excellent site covers this in detail. There is a limit for the total amount of cash that can change hands during the salary cap year per team; it changes each year but is between $3MM and $4MM total. As such it's not a whole lot of money compared to the total value of a team, so it's not exactly a lucrative way to make money.
Draft picks aren't explicitly mentioned as being able to be traded for cash or not being able to be traded for cash, so I believe they are able to be traded (as they're not particularly different from players), subject to the Ted Stepien Rule. They count as $0 towards the salary cap, though, until drafted. Given the fact that draft picks tend to be how you build a lower-salary team [as drafted players tend to overperform their salary due to rookie scale contracts], it wouldn't make a lot of sense to 'sell' a draft pick for cash directly. More effective would simply be trading down - say, a 1st rounder for 2 second rounders. Occasionally a team won't have room for a draft pick (particularly teams with a lot of picks, see the 76ers lately), and they'll trade it for cash in that situation (or a next-year pick) to a team who wants to take a flyer on a guy.
What you do find fairly commonly is the concept of trading for a player with an expiring contract; that's quite easy to do and benefits the team losing the pick immensely, as they are then able to clear salary cap space more easily. They also might be more able to trade for another player, as you need to match salaries to make it work.
You also see teams trade players after they've been drafted; this is better than trading before they're drafted, as the salary now counts - so they get a trade exception for that amount which they can then use later. For example, the 2015 draft saw the Pelicans trade their 2nd rounder to the Clippers for cash after he'd been selected (though they may well have had an agreement to select that player beforehand).