An uninspiring match was settled late on by Callum Paterson's winner for the promotion-chasers.
An 82nd-minute corner initially fell to defender Sol Bamba, whose shot was blocked on the line, but Paterson was well placed to fire the ball into the roof of the net to give the Bluebirds a valuable three points.
The game had been a cagey affair with both teams struggling to create clear chances but the nature of the win will not matter to the visitors, who took advantage of Sheffield United's defeat to Fulham to go second in the Championship.
Heckingbottom, though, said gamesmanship played its part and that he 'expects stronger refereeing'.
"It was garbage because we got beat," he said
"I'd rather be in their dressing room than ours. It's a disappointing way to lose a game.
"I'm not having a go at Cardiff, as they're so difficult to play against. They have lots of goals in them, lots of experience and gamesmanship.
"I'm not having a go, but you expect stronger refereeing. I knew what the game was going to be like. It was going to be like that.
"We stood up to it and managed it and if any team was going to win it, it was going to be a goal like that.
"It was the exact same game as last season. I've been working with some of the players a long time. There's probably only two or three who could stand up to the challenge and not let certain tactics intimidate them but then impose themselves on the game."
Bluebirds boss Neil Warnock praised his players afterwards.
"I think it just down to the character of the players, really," he said.
"I was so disappointed at half-time, I can't tell you. But we had a few words at half-time and I thought we were a lot better in the second half.
"We played on the front foot. I thought Joe Ralls and Aron Gunnarsson got amongst it as they were too far off in the first half.
"I think it was our best result of the season, so you can take that either way.
"We've had some very good results, but I think tonight, playing like we did, to come out with a win and three valuable points is as good as it gets and that's what you've got to do away from home."